From: | "Dan Langille" <dan(at)langille(dot)org> |
---|---|
To: | "Joel Burton" <joel(at)joelburton(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: SERIAL Field |
Date: | 2002-05-06 18:25:21 |
Message-ID: | 20010507142738.DE7B63F43@bast.unixathome.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 6 May 2002 at 12:43, Joel Burton wrote:
> > -----Original Message-----
> > From: Dan Langille [mailto:dan(at)langille(dot)org]
> > Sent: Monday, May 06, 2002 12:41 PM
> > To: Joel Burton
> > Cc: pgsql-admin(at)postgresql(dot)org
> > Subject: Re: [ADMIN] SERIAL Field
> >
> > > 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.
> >
> > Why is that "less risk"?
>
> It's not; nextval() is just fine. I was half asleep and thinking, I think,
> of another database when I wrote that.
>
> "You say nextval() + write, I say write + currval()..."
So long as a given application does not mix the two approaches, everything
should be fine.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples
From | Date | Subject | |
---|---|---|---|
Next Message | Bolek Bakowski | 2002-05-06 18:35:45 | Connection to multiple databases |
Previous Message | Joel Burton | 2002-05-06 16:43:24 | Re: SERIAL Field |