From: | "Joel Burton" <joel(at)joelburton(dot)com> |
---|---|
To: | "Joel Burton" <joel(at)joelburton(dot)com>, "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>, "Gaetano Mendola" <mendola(at)bigfoot(dot)com>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: SERIAL Field |
Date: | 2002-05-06 14:57:19 |
Message-ID: | JGEPJNMCKODMDHGOBKDNIEPKCMAA.joel@joelburton.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
> -----Original Message-----
> From: Joel Burton [mailto:joel(at)joelburton(dot)com]
> Sent: Monday, May 06, 2002 10:51 AM
> To: Rajesh Kumar Mallah.; Gaetano Mendola; pgsql-admin(at)postgresql(dot)org
> Subject: RE: [ADMIN] SERIAL Field
>
>
> > -----Original Message-----
> > From: pgsql-admin-owner(at)postgresql(dot)org
> > [mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Rajesh Kumar
> > Mallah.
> > Sent: Monday, May 06, 2002 9:26 AM
> > To: Gaetano Mendola; pgsql-admin(at)postgresql(dot)org
> > Subject: Re: [ADMIN] SERIAL Field
>
> > But the very idea of inserting the value and then retriving the
> sequence
> > number sounds fishy to me. Why not get the sequence number
> first and than
> > insert using that seqnce number (more on the flash tutorial ).
>
> Hmmm... does nextval() 'hold' a sequence number for this backend?
> Otherwise, the risk would be that you request a value, and
> someone else has beat you to it before you insert it.
Duh. Of course it does. Forgive me: it's still a bit early here in EST for
my brain to be on.
> In any event, inserting then using currval() is the standard
> practice around here, and it works great. Nothing fishy at all
> here, nothing to see, move on.
>
> J.
>
> Joel BURTON | joel(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
> Knowledge Management & Technology Consultant
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Langille | 2002-05-06 16:41:24 | Re: SERIAL Field |
Previous Message | Joel Burton | 2002-05-06 14:51:21 | Re: SERIAL Field |