Just an FYI, in PostgreSQL 8.2.4 they added a new feature "returning"
which can be used to avoid the need for an additional query (to get the
value of serial columns) when inserting records:

test=# create table foo ( id serial primary key not null, name text );

test=# insert into foo ( name ) values ( 'test 1' ) returning id;
 id 
----
  1
(1 row)

test=# insert into foo ( name ) values ( 'test 2' ) returning *;
 id |  name   
----+---------
  2 | test 2
(1 row)


Thought it would be worth mentioning.

Regards,
Cliff


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to