Re: minor cleanup in plpgsql.sgml

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: minor cleanup in plpgsql.sgml
Date: 2003-11-25 21:16:25
Message-ID: 1069794986.21305.538.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Tue, 2003-11-25 at 14:24, Peter Eisentraut wrote:
> Tom Lane writes:
>
> > Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > > ! SELECT INTO users_rec * FROM users WHERE user_id=3;
> > > --- 986,993 ----
> > > ! SELECT * FROM users WHERE user_id=3 INTO users_rec;
> >
> > Why do you want to change the example to disagree with the advice given
> > just above?
> >
> > : At present, the INTO clause can appear almost anywhere in the SELECT
> > : statement, but it is recommended to place it immediately after the
> > : SELECT key word as depicted above. Future versions of PL/pgSQL may be
> > : less forgiving about placement of the INTO clause.
>
> Well, that position is a strange choice. The standard syntax of SELECT
> INTO in embedded SQL is
>
> SELECT a, b, c INTO :x, :y, :z FROM ...
>
> This should probably be consistent.
>

Funny. That's a good argument for doing it that way, but almost the same
argument I make for putting the INTO at the end: so as to not confuse
people with the "SELECT a,b,c INTO newtable FROM oldtable" sql syntax.
In either case ISTM the existing recommendation is flawed.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-11-25 21:44:10 Re: minor cleanup in plpgsql.sgml
Previous Message Robert Treat 2003-11-25 21:15:54 Re: minor cleanup in plpgsql.sgml