The value returned by autoinc ?

From: Silvio Emanuel Barbosa de Macedo <smacedo(at)inescn(dot)pt>
To: pgsql general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: The value returned by autoinc ?
Date: 1999-03-15 00:57:44
Message-ID: Pine.GSO.3.96.990315005145.20927C-100000@newton.inescn.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi!
When I insert data into a table with a sequence associated to a column
(and the required trigger), how can I know the value the sequence has
just generated ? (think in parallel accesses)

Would this approach be the answer ?
begin work
insert...
select max...
commit

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
`````````````````````````````````````````````
Silvio Emanuel Nunes Barbosa de Macedo
mailto:smacedo(at)inescn(dot)pt

INESC - Porto - Grupo CAV
Pc da Republica, 93 R/C Tel:351 2 209 42 21
4000 PORTO PORTUGAL Fax:351 2 208 41 72

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Puckett 1999-03-15 02:10:38 postgres and PERL
Previous Message Bruce Momjian 1999-03-15 00:34:27 Re: [GENERAL] Foreign Keys: check_primary_function