Dale Strickland-Clark wrote: > Now that OIDs have been deprecated in PostgreSQL, how do you find the key of > a newly inserted record? > > I've tried three Python client libraries, including psycopg2, and where they > support cursor attribute 'lastrowid' (Python DB API 2.0), it is always > zero. > > Anyone figured this out? >
Hi, It's of course strictly a PostgreSQL question, but have you tried select lastval(); ? According to my reading of the postgress manuals, that should do the trick. Cheers, --Tim > Thanks. > -- > Dale Strickland-Clark > Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list