Re: sqlite in 2.7 on redhat 6

2017-06-16 Thread Thomas Jollans
On 15/06/17 14:45, Larry Martell wrote: > I am trying to use sqlite > > $ python2.7 > Python 2.7.10 (default, Feb 22 2016, 12:13:36) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import _sqlite3 > Traceback (most r

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 1:44 PM, Kushal Kumaran wrote: > Your python was built without sqlite3 support. If your yum repo > provider is unable to rebuild with sqlite3, you can do so yourself. > Make sure the sqlite-devel package is installed so your python build > will use it. Decided to do this

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Kushal Kumaran
Larry Martell writes: > On Thu, Jun 15, 2017 at 12:20 PM, Kushal Kumaran wrote: >> Larry Martell writes: >> >>> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: Larry Martell wrote: >> On linux the system sqlite3 is used. > > I tried building and ins

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 12:20 PM, Kushal Kumaran wrote: > Larry Martell writes: > >> On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: >>> Larry Martell wrote: >>> > On linux the system sqlite3 is used. I tried building and installing sqlite from source and tha

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Kushal Kumaran
Larry Martell writes: > On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: >> Larry Martell wrote: >> On linux the system sqlite3 is used. >>> >>> I tried building and installing sqlite from source and that did not >>> solve the problem. >> >> You misunderstood: the prob

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Peter Otten
Larry Martell wrote: > Sorry I mistyped - it wasn't pip it was yum. OK, I'm out then. Looks like what works for Debian derivatives is not easily transferable to Redhead... -- https://mail.python.org/mailman/listinfo/python-list

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 10:35 AM, Peter Otten <__pete...@web.de> wrote: > Larry Martell wrote: > >>> On linux the system sqlite3 is used. >> >> I tried building and installing sqlite from source and that did not >> solve the problem. > > You misunderstood: the problem is not sqlite3 it's that pytho

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Peter Otten
Larry Martell wrote: >> On linux the system sqlite3 is used. > > I tried building and installing sqlite from source and that did not > solve the problem. You misunderstood: the problem is not sqlite3 it's that python needs sqlite3's header files. >> Is that a Python version that you compiled y

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 9:55 AM, Peter Otten <__pete...@web.de> wrote: > Larry Martell wrote: > >> On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list >> wrote: >>> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com >>> wrote: I am trying to use sqlite

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Peter Otten
Larry Martell wrote: > On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list > wrote: >> On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com >> wrote: >>> I am trying to use sqlite >>> >>> $ python2.7 >>> Python 2.7.10 (default, Feb 22 2016, 12:13:36) >>> [GCC 4.4.7 20

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Larry Martell
On Thu, Jun 15, 2017 at 8:56 AM, Mark Summerfield via Python-list wrote: > On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com wrote: >> I am trying to use sqlite >> >> $ python2.7 >> Python 2.7.10 (default, Feb 22 2016, 12:13:36) >> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Mark Summerfield via Python-list
On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, larry@gmail.com wrote: > I am trying to use sqlite > > $ python2.7 > Python 2.7.10 (default, Feb 22 2016, 12:13:36) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>

Re: sqlite 3 attribute error __exit__

2016-05-15 Thread Sayth Renshaw
> > As you've written it, the statement declares your intent to enter both > ‘conn’ and ‘conn.cursor()’ as context managers. > > https://docs.python.org/3/reference/compound_stmts.html#with> > > To “enter a context manager” entails calling the ‘__enter__’ method on > the context manager obje

Re: sqlite 3 attribute error __exit__

2016-05-15 Thread Sayth Renshaw
On Monday, 16 May 2016 12:45:26 UTC+10, DFS wrote: > On 5/15/2016 10:21 PM, Sayth Renshaw wrote: > > Hi > > > > I have a file and want to create the sqlite3 db. Using with however i > > receive an attribute error and it causes an exit. > > > > The relevant section of the file is: > > > > import s

Re: sqlite 3 attribute error __exit__

2016-05-15 Thread Ben Finney
Sayth Renshaw writes: > with conn, conn.cursor() as cur: What are you expecting this ‘with’ statement to do? As you've written it, the statement declares your intent to enter both ‘conn’ and ‘conn.cursor()’ as context managers. https://docs.python.org/3/reference/compound_stmts.html#with>

Re: SQLite

2016-03-06 Thread Klaus Jantzen
On 02/22/2016 09:32 AM, Klaus Jantzen wrote: On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote: (Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: [[1]1]python-list@python.org > F

Re: SQLite

2016-02-22 Thread Chris Angelico
On Mon, Feb 22, 2016 at 7:40 PM, Klaus Jantzen wrote: >That did not work because I did not install Python 3.5. with apt-get >but downloaded the source and compiled myself. >Thus apt-get does not have any information about the Python 3.5 >installation. It generally does work; the b

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/22/2016 02:44 AM, Chris Angelico wrote: On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam [1] wrote: IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python That may well work, but it's probably easier to work this way: sudo apt-get build

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote: (Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: [1]python-list@python.org > From: [2]k.d.jant...@mailbox.org > Subject: SQLite

Re: SQLite

2016-02-21 Thread Chris Angelico
On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam wrote: > IIRC, you have to do > sudo apt-get install build-essential python-dev > ... then re-compile python That may well work, but it's probably easier to work this way: sudo apt-get build-dep python3 That should grab all the compilation depe

RE: SQLite

2016-02-21 Thread Albert-Jan Roskam
(Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: python-list@python.org > From: k.d.jant...@mailbox.org > Subject: SQLite > Date: Sun, 21 Feb 2016 18:11:18 +0100 > >Hello, > >I have downloaded Python3.5.1 as .t

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-22 Thread Ryan Stuart
On Tue, Sep 22, 2015 at 5:12 PM, Sol T wrote: > I know I can do this per connection, however how can I have it set to > default? Does this need to be compiled into python? > If you need to compile sqlite you might want to look at apsw: https://github.com/rogerbinns/apsw Cheers > > On Tue, Sep

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-22 Thread Sol T
Hi, I know I can do this per connection, however how can I have it set to default? Does this need to be compiled into python? On Tue, Sep 22, 2015 at 2:04 PM, Ryan Stuart wrote: > On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote: > >> I would like to have the Sqlite pragma statement "locking_mo

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-21 Thread Ryan Stuart
On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote: > I would like to have the Sqlite pragma statement "locking_mode" set to > "EXCLUSIVE" by default (RO database). Does this need to be compiled in? How > might this be achieved? > You can issue any PRAGA statement you like using the execute method

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-21 Thread Sol T
Is anyone aware of documentation that describes how to compile various sqlite options? On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote: > hello > > I would like to have the Sqlite pragma statement "locking_mode" set to > "EXCLUSIVE" by default (RO database). Does this need to be compiled in? H

Re: SQLite + FTS (full text search)

2014-01-23 Thread Terry Reedy
On 1/23/2014 8:24 AM, Asaf Las wrote: On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: Hi, On my Debian stable 64-bit system, SQLite3 has FTS (full text search) enabled (although at version 3 rather than the recommended version 4): Python 3.2.3 (default, Feb 20 2013, 14:4

Re: SQLite + FTS (full text search)

2014-01-23 Thread Rustom Mody
On Thursday, January 23, 2014 7:09:08 PM UTC+5:30, Mark Lawrence wrote: > On 23/01/2014 13:24, Asaf Las wrote: > > It is compile time option. > > http://www.sqlite.org/compile.html#enable_fts3 > > you have to build it with this option enabled. > As an option can be represented in a single bit then

Re: SQLite + FTS (full text search)

2014-01-23 Thread Mark Summerfield
On Thursday, 23 January 2014 14:09:19 UTC, Antoine Pitrou wrote: > Hi, > > > > Mark Summerfield qtrac.plus.com> writes: > > > > > > My guess is that on Debian, the packagers install a full SQLite 3 and the > > Python package uses that. But on > > > Windows I think the Python packagers bun

Re: SQLite + FTS (full text search)

2014-01-23 Thread Chris Angelico
On Fri, Jan 24, 2014 at 12:39 AM, Mark Lawrence wrote: >> >> It is compile time option. >> http://www.sqlite.org/compile.html#enable_fts3 >> you have to build it with this option enabled. >> > > As an option can be represented in a single bit then presumably the Windows > msi file only needs an ex

Re: SQLite + FTS (full text search)

2014-01-23 Thread Antoine Pitrou
Hi, Mark Summerfield qtrac.plus.com> writes: > > My guess is that on Debian, the packagers install a full SQLite 3 and the Python package uses that. But on > Windows I think the Python packagers bundle their own SQLite (quite rightly since it might not already be installed). > > I'd like the W

Re: SQLite + FTS (full text search)

2014-01-23 Thread Asaf Las
On Thursday, January 23, 2014 3:39:08 PM UTC+2, Mark Lawrence wrote: > On 23/01/2014 13:24, Asaf Las wrote: > As an option can be represented in a single bit then presumably the > Windows msi file only needs an extra bit to allow for this, or have I > missed something? While I'm at it what is th

Re: SQLite + FTS (full text search)

2014-01-23 Thread Mark Lawrence
On 23/01/2014 13:24, Asaf Las wrote: On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: Hi, On my Debian stable 64-bit system, SQLite3 has FTS (full text search) enabled (although at version 3 rather than the recommended version 4): Python 3.2.3 (default, Feb 20 2013, 14:44

Re: SQLite + FTS (full text search)

2014-01-23 Thread Asaf Las
On Thursday, January 23, 2014 2:20:31 PM UTC+2, Mark Summerfield wrote: > Hi, > On my Debian stable 64-bit system, SQLite3 has FTS (full text search) > enabled (although at version 3 rather than the recommended version 4): > > Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 >

RE: SQLite + FTS (full text search)

2014-01-23 Thread Joseph L. Casale
> But on Windows when I use the official Python 3.3 32-bit binary from > www.python.org this is not enabled. For an unobtrusive way [1] to gain this, see apsw. For what it's worth, I prefer this package over the built in module. Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.16

Re: [sqlite] Happy New Year

2013-12-31 Thread Ryan Finnesey
Happy New Year to you as well. Sent from my iPad > On Dec 31, 2013, at 7:46 PM, "Igor Korot" wrote: > > Hi, ALL, > I want to wish everybody who is reading and involved with the list > Happy and oyful New Year! > Let's have a great time in it and lets make a lot of good products and > new relea

RE: sqlite issue in 2.7.5

2013-09-09 Thread Joseph L. Casale
> This pragma speeds up most processes 10-20 times (yes 10-20): > pragma synchronous=OFF > > See the SQLITE documentation for an explanation. > I've found no problems with this setting. Aside from database integrity and consistency? :) I have that one set to OFF as my case mandates data processing

Re: sqlite issue in 2.7.5

2013-09-09 Thread mbg1708
On Tuesday, September 3, 2013 8:22:42 AM UTC-4, Alister wrote: > On Mon, 02 Sep 2013 22:13:27 +, Joseph L. Casale wrote: > > > > > I have been battling an issue hopefully someone here has insight with. > > > > > > I have a database with a few tables I perform a query against with some >

Re: sqlite issue in 2.7.5

2013-09-03 Thread Alister
On Mon, 02 Sep 2013 22:13:27 +, Joseph L. Casale wrote: > I have been battling an issue hopefully someone here has insight with. > > I have a database with a few tables I perform a query against with some > joins against columns collated with NOCASE that leverage = comparisons. > > Running t

Re: SQLite logic error or missing database

2013-07-29 Thread Chris Angelico
On Tue, Jul 30, 2013 at 3:02 AM, CM wrote: > If I try additional commits in that same instance of my app being open, > it gives me the same error every time. If I close the app and re-open > it, it does not give me this error, with the same or very similar data > being written in the same routine

Re: sqlite INSERT performance

2012-05-31 Thread duncan smith
On 31/05/12 17:06, Jon Clements wrote: On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote: On 31/05/12 06:15, John Nagle wrote: On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the performan

Re: sqlite INSERT performance

2012-05-31 Thread Jon Clements
On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote: > On 31/05/12 06:15, John Nagle wrote: > > On 5/30/2012 6:57 PM, duncan smith wrote: > >> Hello, > >> I have been attempting to speed up some code by using an sqlite > >> database, but I'm not getting the performance gains I expected. >

Re: sqlite INSERT performance

2012-05-31 Thread duncan smith
On 31/05/12 06:15, John Nagle wrote: On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the performance gains I expected. SQLite is a "lite" database. It's good for data that's read a lot and not change

Re: sqlite INSERT performance

2012-05-30 Thread Ben Finney
John Nagle writes: > If you have 67 columns in a table, you may be approaching the > problem incorrectly. +1 SQL QotW, on basis of diplomacy. The OP may need to learn about database normalisation https://en.wikipedia.org/wiki/Database_normalization>. -- \“Sane people have an appr

Re: sqlite INSERT performance

2012-05-30 Thread John Nagle
On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the performance gains I expected. SQLite is a "lite" database. It's good for data that's read a lot and not changed much. It's good for small data

Re: SQLite server using execnet ?

2011-02-20 Thread Grigory Javadyan
Are you sure you'll still be able to guarantee the ACID'ity of transactions? What about performance? Also, what kind of load are you expecting? I believe this will choke under too much simultaneous queries. On Mon, Feb 21, 2011 at 4:55 AM, Stef Mientki wrote: > hello, > > knowing that SQllite is

Re: sqlite autoincrement of primary key

2010-11-29 Thread tinauser
On Nov 29, 10:49 pm, "D'Arcy J.M. Cain" wrote: > On Mon, 29 Nov 2010 19:11:18 + (UTC) > > Tim Harig wrote: > > >   INSERT INTO foo (name) VALUES ('xxx') > > > > That's the standard SQL way. > > > Yes, it works; but, the OP asked specifically to be able to enter all of > > the field values, in

Re: sqlite autoincrement of primary key

2010-11-29 Thread Tim Harig
On 2010-11-29, D'Arcy J.M. Cain wrote: > On Mon, 29 Nov 2010 19:11:18 + (UTC) > Tim Harig wrote: >> > INSERT INTO foo (name) VALUES ('xxx') >> > >> > That's the standard SQL way. >> >> Yes, it works; but, the OP asked specifically to be able to enter all of >> the field values, including t

Re: sqlite autoincrement of primary key

2010-11-29 Thread D'Arcy J.M. Cain
On Mon, 29 Nov 2010 19:11:18 + (UTC) Tim Harig wrote: > > INSERT INTO foo (name) VALUES ('xxx') > > > > That's the standard SQL way. > > Yes, it works; but, the OP asked specifically to be able to enter all of > the field values, including the autoincrement field. You're right, I missed th

Re: sqlite autoincrement of primary key

2010-11-29 Thread Alan Meyer
On 11/29/2010 1:12 PM, tinauser wrote: Dear List I'm writing an application that has to create and populate an SQLite database. I'm doing pretty well, but now I'm facing a problem I can not solve. I create a table with a primary key autoincrement, something like sqlcmd="CREATE TABLE foo (id INT

Re: sqlite autoincrement of primary key

2010-11-29 Thread tinauser
On Nov 29, 7:28 pm, Tim Harig wrote: > On 2010-11-29, tinauser wrote: > > > ''' > > INSERT INTO 'foo' VALUES (?,?) > > ''' > > ,('NULL','yyy')) > > s/'NULL'/None/ > > > I get a datatype mismatch error. > > The sqlite module is smart enough to convert between Python types and > Sqlite types.  If y

Re: sqlite autoincrement of primary key

2010-11-29 Thread Tim Harig
On 2010-11-29, D'Arcy J.M. Cain wrote: > On Mon, 29 Nov 2010 13:19:19 -0500 > Mel wrote: >> tinauser wrote: >> '''INSERT INTO foo VALUES (NULL, ?)''' > > Does this work in SQLite: > > INSERT INTO foo (name) VALUES ('xxx') > > That's the standard SQL way. Yes, it works; but, the OP asked specif

Re: sqlite autoincrement of primary key

2010-11-29 Thread D'Arcy J.M. Cain
On Mon, 29 Nov 2010 13:19:19 -0500 Mel wrote: > tinauser wrote: > '''INSERT INTO foo VALUES (NULL, ?)''' Does this work in SQLite: INSERT INTO foo (name) VALUES ('xxx') That's the standard SQL way. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/

Re: sqlite autoincrement of primary key

2010-11-29 Thread Tim Harig
On 2010-11-29, tinauser wrote: > ''' > INSERT INTO 'foo' VALUES (?,?) > ''' > ,('NULL','yyy')) s/'NULL'/None/ > I get a datatype mismatch error. The sqlite module is smart enough to convert between Python types and Sqlite types. If you pass it 'NULL' it thinks you are passing it a string. Pyth

Re: sqlite autoincrement of primary key

2010-11-29 Thread John Bokma
tinauser writes: > however, if in python i try to execute a script like: > > cur.execute( > ''' > INSERT INTO 'foo' VALUES (?,?) > ''' > ,('NULL','yyy')) ,(None, 'yyy')) Or use VALUES(NULL, ?) as suggested in another post. -- John Bokma

Re: sqlite autoincrement of primary key

2010-11-29 Thread Mel
tinauser wrote: > Normally, the sqlite command that works would be > > INSERT INTO 'foo' VALUES (NULL, 'yyy' ) > > however, if in python i try to execute a script like: > > cur.execute( > ''' > INSERT INTO 'foo' VALUES (?,?) > ''' > ,('NULL','yyy')) > > I get a datatype mismatch error. > > Ha

Re: SQLite date fields

2010-11-28 Thread Tim Roberts
Duncan Booth wrote: >Tim Roberts wrote: > >>>However, when it comes to writing-back data to the table, SQLite is >>>very forgiving and is quite happy to store '25/06/2003' in a date >>>field, >> >> SQLite is essentially typeless. ALL fields are stored as strings, >> with no interpretation. Y

Re: SQLite date fields

2010-11-26 Thread Alan Harris-Reid
To all those who have replied on this thread - many thanks. It looks as though I've got to look further into date objects, SQLite's native date functions, detect_types, etc.. Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite date fields

2010-11-26 Thread Tim Chase
On 11/26/2010 07:20 AM, Duncan Booth wrote: Tim Roberts wrote: SQLite is essentially typeless. ALL fields are stored as strings, with no interpretation. You can store whatever you want in any column. The column types are basically there to remind YOU how to handle the data. Not all fields

Re: SQLite date fields

2010-11-26 Thread Duncan Booth
Tim Roberts wrote: >>However, when it comes to writing-back data to the table, SQLite is >>very forgiving and is quite happy to store '25/06/2003' in a date >>field, > > SQLite is essentially typeless. ALL fields are stored as strings, > with no interpretation. You can store whatever you want

Re: SQLite date fields

2010-11-25 Thread Tim Roberts
Alan Harris-Reid wrote: > >I am having design problems with date storage/retrieval using Python and >SQLite. > >I understand that a SQLite date column stores dates as text in ISO >format (ie. '2010-05-25'). Only if you store it that way. >So when I display a British date (eg. on a web-page) I

Re: SQLite date fields

2010-11-25 Thread CM
> However, when it comes to writing-back data to the table, SQLite is very > forgiving and is quite happy to store '25/06/2003' in a date field, but > this is not ideal because a) I could be left with a mixture of date > formats in the same column,  b) SQLite's date functions only work with > ISO f

Re: SQLite date fields

2010-11-25 Thread MRAB
On 25/11/2010 00:45, Alan Harris-Reid wrote: Hi, I am having design problems with date storage/retrieval using Python and SQLite. I understand that a SQLite date column stores dates as text in ISO format (ie. '2010-05-25'). So when I display a British date (eg. on a web-page) I convert the dat

Re: SQLite is quite SQL compliant

2010-10-04 Thread Lawrence D'Oliveiro
In message <4ca94af8$0$1637$742ec...@news.sonic.net>, John Nagle wrote: > On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote: >> In message<4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote: >> >>> (Personally, I like MySQL, but I fear Oracle will mess it up.) >> >> Doesn’t matter whet

Re: SQLite is quite SQL compliant

2010-10-03 Thread John Nagle
On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote: In message<4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote: (Personally, I like MySQL, but I fear Oracle will mess it up.) Doesn’t matter whether Oracle messes up the brand called “MySQL” or not. With Free Software, it’s the so

Re: SQLite is quite SQL compliant

2010-10-03 Thread Lawrence D'Oliveiro
In message <4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote: > (Personally, I like MySQL, but I fear Oracle will mess it up.) Doesn’t matter whether Oracle messes up the brand called “MySQL” or not. With Free Software, it’s the software that matters, not the brand. And the softw

Re: SQLite is quite SQL compliant

2010-10-03 Thread Lawrence D'Oliveiro
In message , Seebs wrote: > It is stunning how often you can guess which of two packages will be the > source of a bug just by seeing which one hurts more to look at. QOTW. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite is quite SQL compliant

2010-10-03 Thread Philip Semanchuk
On Oct 3, 2010, at 2:21 PM, John Nagle wrote: > On 10/2/2010 3:06 PM, Seebs wrote: > >> I would agree that the word "nonstandard" seems to be a little strong and >> discouraging. sqlite is a source of joy, a small bright point of decent >> and functional software in a world full of misbehaving

Re: SQLite is quite SQL compliant

2010-10-03 Thread John Nagle
On 10/2/2010 3:06 PM, Seebs wrote: I would agree that the word "nonstandard" seems to be a little strong and discouraging. sqlite is a source of joy, a small bright point of decent and functional software in a world full of misbehaving crap. While it does omit a few bits of SQL functionality,

Re: SQLite is quite SQL compliant

2010-10-03 Thread Nobody
On Sat, 02 Oct 2010 13:06:12 -0700, Ravi wrote: > The documentation of the sqlite module at > http://docs.python.org/library/sqlite3.html says: > > "...allows accessing the database using a nonstandard variant of the > SQL..." > > But if you see SQLite website they clearly say at > http://sqlite

Re: SQLite is quite SQL compliant

2010-10-03 Thread Seebs
On 2010-10-03, Lawrence D'Oliveiro wrote: > In message , Seebs wrote: >> sqlite is a source of joy, a small bright point of decent >> and functional software in a world full of misbehaving crap. > Have you learnt how to be selective in your downloads yet? Sadly, as a side-effect of my day job, I

Re: SQLite is quite SQL compliant

2010-10-03 Thread Florian Weimer
* Ravi: > The documentation of the sqlite module at > http://docs.python.org/library/sqlite3.html > says: > > "...allows accessing the database using a nonstandard variant of the > SQL..." > > But if you see SQLite website they clearly say at > http://sqlite.org/omitted.html that only very few of

Re: SQLite is quite SQL compliant

2010-10-03 Thread Lawrence D'Oliveiro
In message , Seebs wrote: > sqlite is a source of joy, a small bright point of decent > and functional software in a world full of misbehaving crap. Have you learnt how to be selective in your downloads yet? -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite is quite SQL compliant

2010-10-02 Thread Antoine Pitrou
On Sat, 2 Oct 2010 19:13:11 -0400 Philip Semanchuk wrote: > > On Oct 2, 2010, at 6:58 PM, Tim Chase wrote: > > > On 10/02/10 17:06, Seebs wrote: > >> On 2010-10-02, Ravi wrote: > >>> The documentation of the sqlite module at > >>> http://docs.python.org/library/sqlite3.html says: > >> > >>> ".

Re: SQLite is quite SQL compliant

2010-10-02 Thread Philip Semanchuk
On Oct 2, 2010, at 6:58 PM, Tim Chase wrote: > On 10/02/10 17:06, Seebs wrote: >> On 2010-10-02, Ravi wrote: >>> The documentation of the sqlite module at >>> http://docs.python.org/library/sqlite3.html says: >> >>> "...allows accessing the database using a nonstandard >>> variant of the SQL...

Re: SQLite is quite SQL compliant

2010-10-02 Thread D'Arcy J.M. Cain
On 02 Oct 2010 22:06:58 GMT Seebs wrote: > I would agree that the word "nonstandard" seems to be a little strong and > discouraging. sqlite is a source of joy, a small bright point of decent > and functional software in a world full of misbehaving crap. While it > does omit a few bits of SQL fun

Re: SQLite is quite SQL compliant

2010-10-02 Thread Tim Chase
On 10/02/10 17:06, Seebs wrote: On 2010-10-02, Ravi wrote: The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: "...allows accessing the database using a nonstandard variant of the SQL..." I would agree that the word "nonstandard" seems to be a little

Re: SQLite is quite SQL compliant

2010-10-02 Thread Seebs
On 2010-10-02, Ravi wrote: > The documentation of the sqlite module at > http://docs.python.org/library/sqlite3.html > says: > "...allows accessing the database using a nonstandard variant of the > SQL..." > But if you see SQLite website they clearly say at > http://sqlite.org/omitted.html > t

Re: SQLite is quite SQL compliant

2010-10-02 Thread Cousin Stanley
Ravi wrote: > The documentation of the sqlite module > at http://docs.python.org/library/sqlite3.html > says: > > "... > allows accessing the database > using a nonstandard variant of the SQL..." > > But if you see SQLite website they clearly say > at http://sqlite.org/omitted.html that onl

Re: sqlite version on windows

2010-03-26 Thread Lawrence D'Oliveiro
In message , Philip Semanchuk wrote: > On Mar 26, 2010, at 5:57 AM, Laszlo Nagy wrote: >> >> On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version: >> 3.6.10 >> On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version: >> 3.5.9 >> >> Why is that? > > The few Linux distros th

Re: sqlite version on windows

2010-03-26 Thread Philip Semanchuk
On Mar 26, 2010, at 5:57 AM, Laszlo Nagy wrote: Hi All, On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version: 3.6.10 On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version: 3.5.9 Why is that? I wrote a program that uses SAVEPOINT/ROLLBACK to. It is only availa

Re: sqlite version on windows

2010-03-26 Thread Laszlo Nagy
2010.03.26. 10:57 keltezéssel, Laszlo Nagy írta: Hi All, On my Linux system: Python version: 2.6.2 sqlite3.sqlite_version: 3.6.10 On my Windows system: Python version: 2.6.5 sqlite3.sqlite_version: 3.5.9 Why is that? I wrote a program that uses SAVEPOINT/ROLLBACK to. It is only available in

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
#1. By using isolation_level = None, connection objects (used as a context manager) WON'T automatically commit or rollback transactions. #2. Using any isolation level, connection objects WON'T automatically begin a transaction. #3. Possibly, include your connection manager class code, to show h

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Ryan Kelly
On Fri, 2010-03-12 at 09:35 +0100, Laszlo Nagy wrote: > > No it doesn't. The problem is that using a connection as a context > > manager doesn't do what you think. > > > > It does *not* start a new transaction on __enter__ and commit it on > > __exit__. As far as I can tell it does nothing on __

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
Annotating your example: # entering this context actually does nothing with conn: # a transaction is magically created before this statement conn.execute("insert into a values (1)") # and is implicitly committed before this statement conn.execute("SAVEPOINT sp1")

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
No it doesn't. The problem is that using a connection as a context manager doesn't do what you think. It does *not* start a new transaction on __enter__ and commit it on __exit__. As far as I can tell it does nothing on __enter__ and calls con.commit() or con.rollback() on exit. With isola

Re: sqlite savepoint problem

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 08:32 +0100, Laszlo Nagy wrote: > > From memory you can't issue a "CREATE TABLE" statement inside a > > transaction, at least not at the default isolation level. Such a > > statement will automatically commit the current transaction. Doesn't > > help with your current proble

Re: sqlite savepoint problem

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 08:48 +0100, Laszlo Nagy wrote: > > > > I'm now confused. Also, I could not find anything about these > > isolation levels on the sqlite website. The only think I could find is > > "PRAGMA read_uncommited". If that is the same as setting > > isolation_level to None, then I

Re: sqlite savepoint problem

2010-03-14 Thread Laszlo Nagy
I'm now confused. Also, I could not find anything about these isolation levels on the sqlite website. The only think I could find is "PRAGMA read_uncommited". If that is the same as setting isolation_level to None, then I don't want it. Yes, it is. Here is a test: import os import sqlite3

Re: sqlite savepoint problem

2010-03-14 Thread Laszlo Nagy
From memory you can't issue a "CREATE TABLE" statement inside a transaction, at least not at the default isolation level. Such a statement will automatically commit the current transaction. Doesn't help with your current problem but worth pointing out :-) Thank you. I'll keep in mind. Whe

Re: sqlite savepoint problem (was: Re: sqlite3 is sqlite 2?)

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 07:46 +0100, Laszlo Nagy wrote: > > > >>> import sqlite3 > >>> conn = sqlite3.connect(':memory:') > >>> with conn: > ... conn.execute("BEGIN") > ... conn.execute("create table a ( i integer)") > ... conn.execute("insert into a values (1)") > ... conn.execute

Re: sqlite question

2009-10-17 Thread Diez B. Roggisch
Roger Binns schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis Lee Bieber wrote: I suspect, besides building an sqlite3.dll (if Windows), you might have to modify the pysqlite DB-API adapter to support whatever new arguments have been added to various calls (most like the db.

Re: sqlite question

2009-10-17 Thread koranthala
On Oct 17, 12:18 pm, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Dennis Lee Bieber wrote: > >    I suspect, besides building an sqlite3.dll (if Windows), you might > > have to modify the pysqlite DB-API adapter to support whatever new > > arguments have been added to v

Re: sqlite question

2009-10-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis Lee Bieber wrote: > I suspect, besides building an sqlite3.dll (if Windows), you might > have to modify the pysqlite DB-API adapter to support whatever new > arguments have been added to various calls (most like the db.connect() > paramete

Re: SQLite or files?

2009-10-05 Thread Gabriel Genellina
En Mon, 05 Oct 2009 23:08:59 -0300, AggieDan04 escribió: On Sep 17, 9:10 am, J Kenneth King wrote: ici writes: > I likeshelvefor saving small amounts of data, user preferences, > recent files etc. >http://docs.python.org/library/shelve.html I like it too, but I hear the great powers that

Re: SQLite or files?

2009-10-05 Thread AggieDan04
On Sep 17, 9:10 am, J Kenneth King wrote: > ici writes: > > I likeshelvefor saving small amounts of data, user preferences, > > recent files etc. > >http://docs.python.org/library/shelve.html > > I like it too, but I hear the great powers that be are going to > deprecate it. If you want the conv

Re: SQLite or files?

2009-09-18 Thread Tim Chase
You can also make a SQLite database be in-memory, giving you the performance benefits of skipping the disk. Yes, I love the in-memory database -- especially for my automated testing in Django. However, the OP said that memory footprint was a concern (granted, I don't know how much data they

Re: SQLite or files?

2009-09-17 Thread TerryP
alex23 wrote: > So what part of the standard library do you recommend using instead? > Or was there no time for advice between snarkiness? As a matter of technique, I believe in fitting the storage to the particulars of the problem at hand. In my own projects, I will often employ simple text base

Re: SQLite or files?

2009-09-17 Thread Aahz
In article , Tim Chase wrote: > >- I don't know if you're currently keeping the RTF in memory the >whole time, or if you repeatedly reload (whether in one go, or >streaming it) and reparse the file. This sounds memory and/or >processor intensive. Using sqlite, the processing is done at the

Re: SQLite or files?

2009-09-17 Thread alex23
TerryP wrote: > Yeah, I'm sure that is the same kind of thinking that caused 16-bit MS- > DOS applications to remain a part of Windows NT so long. So what part of the standard library do you recommend using instead? Or was there no time for advice between snarkiness? -- http://mail.python.org/m

Re: SQLite or files?

2009-09-17 Thread TerryP
Gabriel Genellina wrote: > And even after it's > gone, being a pure Python module it's easy to keep the previous version > around. > So, I wouldn't worry about that. Yeah, I'm sure that is the same kind of thinking that caused 16-bit MS- DOS applications to remain a part of Windows NT so long.

  1   2   3   >