PostgreSQL, psycopg2 and OID-less tables

Jim jhefferon at smcvt.edu
Sat Sep 16 07:15:59 EDT 2006


Frank Millman wrote:
> I therefore use the following -
>     cur.execute("select currval('%s_%s_Seq')" % (tableid, columnid)
I use this also (although isn't it right that sometimes the name of the
sequence is not so straightforward? for instance, isn't there a limit
on the number of chars?).

Can anyone say what is an advantage of the two nextval() solutions
described earlier in this thread over the currval() solution listed
here?

Jim




More information about the Python-list mailing list