Re: FAQ error - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: FAQ error
Date
Msg-id 200110111946.f9BJkgP03220@candle.pha.pa.us
Whole thread Raw
In response to Re: FAQ error  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> Bruce Momjian writes:
> 
> > Our FAQ, item 4.16.2 has:
> >
> >     $newSerialID = nextval('person_id_seq');
> >     INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
> >
> > Is this correct Perl?
> 
> No.  I always thought it was pseudo code.  I think it's fine.

It is psaudo-code, but the assignment for nextval() is just wrong:

> >     $newSerialID = nextval('person_id_seq');

I am going to flesh this out with the SELECT but not the rest.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: CLUSTER TODO item
Next
From: Bruce Momjian
Date:
Subject: Re: Proposal: new GUC paramter