Dennis Björklund wrote:
>It's not needed. The following works fine (if the tables exists of course)
>and has no problems with concurrency:
>
>INSERT INTO foo(id,x) VALUES (DEFAULT, 'value');
>INSERT INTO bar(id,foo_ref) VALUES (DEFAULT, currval('foo_id_seq'));
>
>
>
You don't even need the 'DEFAULT' word as I remember, but it makes for
easier code to follow.