Re: FAQ error

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Brent Verner <brent(at)rcfile(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FAQ error
Date: 2001-10-14 11:43:53
Message-ID: Pine.LNX.4.30.0110141343010.849-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian writes:

> > Bruce Momjian writes:
> >
> > > OK, new FAQ code is:
> > >
> > > $sql = "SELECT nextval('person_id_seq')";
> > > $newSerialID = ($conn->selectrow_array($sql))[0];
> > > INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
> > > $res = $dbh->do($sql);
> >
> > This code is still incorrect for any known programming language and it's
> > even less clear to a person that doesn't know the programming language
> > it's probably trying to imitate.
>
> OK, what suggestions do you have?

I didn't have a problem with the original version. It conveyed clearly
(to me), "read the nextval and insert it yourself".

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Studenmund 2001-10-14 12:22:36 Re: namespaces, was Package support for Postgres
Previous Message Bill Studenmund 2001-10-14 11:42:43 Re: [HACKERS] Package support for Postgres