The value returned by autoinc ? - Mailing list pgsql-general

From Silvio Emanuel Barbosa de Macedo
Subject The value returned by autoinc ?
Date
Msg-id Pine.GSO.3.96.990315005145.20927C-100000@newton.inescn.pt
Whole thread Raw
Responses Re: [GENERAL] The value returned by autoinc ?
List 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@inescn.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








pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Foreign Keys: check_primary_function
Next
From: "James Puckett"
Date:
Subject: postgres and PERL