pgsql: Allow IMPORT FOREIGN SCHEMA within pl/pgsql.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow IMPORT FOREIGN SCHEMA within pl/pgsql.
Date: 2016-07-12 22:07:18
Message-ID: E1bN5pm-00023l-4Y@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow IMPORT FOREIGN SCHEMA within pl/pgsql.

Since IMPORT FOREIGN SCHEMA has an INTO clause, pl/pgsql needs to be
aware of that and avoid capturing the INTO as an INTO-variables clause.
This isn't hard, though it's annoying to have to make IMPORT a plpgsql
keyword just for this. (Fortunately, we have the infrastructure now
to make it an unreserved keyword, so at least this shouldn't break any
existing pl/pgsql code.)

Per report from Merlin Moncure. Back-patch to 9.5 where IMPORT FOREIGN
SCHEMA was introduced.

Report: <CAHyXU0wpHf2bbtKGL1gtUEFATCY86r=VKxfcACVcTMQ70mCyig(at)mail(dot)gmail(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/baebab3ace480477f210dadc4633d8d119dfa978

Modified Files
--------------
src/pl/plpgsql/src/pl_gram.y | 47 +++++++++++++++++++++++++++++++++--------
src/pl/plpgsql/src/pl_scanner.c | 1 +
2 files changed, 39 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2016-07-12 22:11:56 pgsql: Put some things in a better order in psql help
Previous Message Fabrízio de Royes Mello 2016-07-12 20:42:21 Re: [COMMITTERS] Logical decoding