[DB-SIG] db paramstyle for arrays
mal at egenix.com
Wed Apr 7 05:11:31 EDT 2004
Lee Harr wrote:
>> LH> Is there a special DB API style for inserting array values
>> LH> in
>> LH> to a database?
>> What DB API module do you use? For pyPgSQL the answer is in FAQ
>> If you want to use ARRAYs, you'll now need to wrap your (nested)
>> lists with PgSQL.PgArray
> I am using psycopg.
> grep'ng through the psycopg distribution does not reveal
> mention of ARRAY, so I guess it does not support that.
> Is there anything about it in the DB API? I looked through pep 249
> but I do not see anything. I could create a patch
> for psycopg to do something like the way pyPgSQL does it, but
> it would be good if they were all the same...
The DB API supports doing bulk inserts via .executemany(),
but I'm not sure whether the same thing as inserting ARRAYs
which seem to be a postgresql special data type from your
Professional Python Services directly from the Source (#1, Apr 07 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Python UK 2004, Oxford, UK 8 days left
EuroPython 2004, Göteborg, Sweden 60 days left
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the DB-SIG