[EMAIL PROTECTED] wrote:

In the FAQ's on the web site it indicated that when the primary key is
autoincrement, the data type is a signed 64 bit number.  Has this been your
experience?
never noticed... not in Python with the sqlite modules I have... and no difference whether I use the 'autoincrement' keyword or not, as long as we're talking about 'integer primary key' / oid...

Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
{also tried with no difference:
Python 2.4.1 (#2, Oct 18 2006, 20:58:01)
}
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import dbapi2 as sqlite
>>> db = sqlite.connect(':memory:')
>>> cr = db.cursor()
>>> cr.execute('create table test(pk integer primary key autoincrement, v string)')
>>> cr.execute("insert into test (v) values ('test')")
>>> cr.execute("select * from test")
>>> cr.fetchone()
(1, u'test')
>>> cr.execute("select * from test")
>>> [type(i) for i in cr.fetchone()]
[<type 'int'>, <type 'unicode'>]
>>> type(1L)
<type 'long'>
>>>

Python 2.4.4 (#2, Oct 20 2006, 00:57:46)
[GCC 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite
>>> db = sqlite.connect(':memory:')
>>> cr = db.cursor()
>>> cr.execute('create table test(pk integer primary key, v string)')
>>> cr.execute("insert into test (v) values ('test')")
>>> cr.execute("select * from test")
>>> cr.fetchone()
(1, 'test')
>>> cr.execute("select * from test")
>>> [type(i) for i in cr.fetchone()]
[<type 'int'>, <type 'str'>]
>>>

in short: no, it's not my experience.

MF

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to