Re: Parent Id - Mailing list pgsql-general

From Gene Vital
Subject Re: Parent Id
Date
Msg-id 3F85BD2F.7090802@karibe.com
Whole thread Raw
In response to Re: Parent Id  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Parent Id  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
have an example :)

Bruno Wolff III wrote:

> On Thu, Oct 09, 2003 at 14:26:21 -0400,
>   Gene Vital <genevital@karibe.com> wrote:
>
>>when inserting new records into  parent / child tables, what is the best
>>recommended way of retrieving the pkey value from the parent table when
>>using auto incrementing fields ?
>
>
> You want to use currval. currval will return the last value obtained
> by nextval in the same session, so it is safe to use without any additional
> locking.
>

--
Eugene Vital
Any technology indistinguishable from magic is insufficiently advanced.




pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Domains (was Re: int1?)
Next
From: Bruno Wolff III
Date:
Subject: Re: Domains (was Re: int1?)