> > Does http://www.postgresql.org/docs/7.3/static/functions- > sequence.html help? > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com I'm sorry Ed we have to be talking about different subjects. I understand how to use the Postgres sequences. I understand nextval(seq), curval(seq) and lastval(). But these depend on a sequence for the table. I don't think a PK has to be a sequence. Note I assume Dabo is not just allowing sequences.
BTW for my project there are no issues. We use sequences. psycopg cursor.lastrowid returns the 'OID' for the last insert if the database used OID's. So using OID's to identify the record will work only some of the time. But there are system objects that can be accessed such as ctid() (possible to get the last record entered -but what about multiuser issues) that might help. But psycopg is not supporting anything but OID. In either case Larry was not expecting some strange number returned. He was expecting the PK of his last insert (in this case a sequence) when he used dabo cursor.lastrowid. I was thinking most dabo users would expect the same thing. So in my mind I was hoping to return that PK no matter the type. The questions therefore are how to determine the field name of the PK, and the last record inserted with the connection. -- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
