> You can do a SELECT curval('sequence_name'); to get the value you were
just
> assigned without worrying about other people updating, as curval gets the
> current value within the current transaction (or within the current
> session, either way, it works.)
Or, my prefered method, create the table like so..
create table MyTable
(
MyField int4 default nextval('SomeSequence'),
...
);
That gives you the flexibility to select the nextval of the sequence and
insert it yourself (if you need it for further processing), or to simply
let the database take care of it for itself.
steve