Dave Cramer <pg 'at' fastcrypt.com> writes:
> 2)
> allow the insert to go through
> select currval('public."tblTable1_FieldID_seq"'::text)
> and then use this to insert into table 2
>
> FYI currval does the "right" thing. It is guaranteed to be the value
> your connection retrieved from the sequence.
Which can be wrong in case of multithreaded applications without
synchronization over the two requests, if I'm correct.
--
Guillaume Cottenceau