From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | Vadim Mikheev <vadim(at)krs(dot)ru>, "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
Cc: | James Oden <joden(at)Lee(dot)k12(dot)nc(dot)us>, dustin sallings <dustin(at)spy(dot)net>, Fran Fabrizio <fran(at)primary(dot)net>, pgsql-general(at)postgreSQL(dot)org |
Subject: | RE: [GENERAL] getting the currval of a sequence |
Date: | 1998-08-17 14:58:48 |
Message-ID: | F10BB1FAF801D111829B0060971D839F39B4A7@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Jackson, DeJuan wrote:
> >
> > I think you should just go with what Vadim suggested and use:
> > select currval('my_sequence');
> > This will be the same within a transaction, even if there is another
> ^^^^^^^^^^^
> session
>
> > transaction using the same sequence.
> > But (if memory servers), you have to have had select a nextval from
> that
> > same sequence within the transaction.
> ^^^^^^^^^^^
> session!
>
> This is from create_sequence manual:
>
> "...Function currval ('sequence_name') may be used
> to determine number returned by last call to nextval for
> specified sequence in current session."
>
> Vadim
>
Vadim, what's a session?
-DEJ
From | Date | Subject | |
---|---|---|---|
Next Message | Dario Besseghini | 1998-08-17 14:59:30 | CREATE TABLE ... CONSTRAINT |
Previous Message | Anand Surelia | 1998-08-17 10:26:45 | Database Connect Permission |