Re: minor cleanup in plpgsql.sgml - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: minor cleanup in plpgsql.sgml
Date
Msg-id Pine.LNX.4.44.0311252022350.11097-100000@peter.localdomain
Whole thread Raw
In response to Re: minor cleanup in plpgsql.sgml  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: minor cleanup in plpgsql.sgml  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: minor cleanup in plpgsql.sgml  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-patches
Tom Lane writes:

> Robert Treat <xzilla@users.sourceforge.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.

--
Peter Eisentraut   peter_e@gmx.net


pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Install pg_config_manual.h
Next
From: Neil Conway
Date:
Subject: Re: preliminary: logical column order