[NOVICE] Re: sequence integrity insite begin-commit?

Tom Lane tgl at sss.pgh.pa.us
Wed May 23 18:45:56 EDT 2001


Rob Brown-Bayliss <rob at ZOOstation.cc> writes:
>> So what I am doing is begining a transaction, inserting the data,
>> selecting the last_value from the sequence and then commiting the
>> transaction.

last_value is wrong.  currval() will work.  See the many prior
discussions of sequences in the mailing list archives.

			regards, tom lane




More information about the Python-list mailing list