Allow IMPORT FOREIGN SCHEMA within pl/pgsql.
authorTom Lane <[email protected]>
Tue, 12 Jul 2016 22:06:50 +0000 (18:06 -0400)
committerTom Lane <[email protected]>
Tue, 12 Jul 2016 22:06:50 +0000 (18:06 -0400)
commita0943dbbea533e266f2db56d62ad43d9e0ed090a
tree2633f8b9dc57bddf19e31e0f52c6d2db2d21814b
parent2d22c3b701ca1283eeb504d0fe75e8c595e5523b
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@mail.gmail.com>
src/pl/plpgsql/src/pl_gram.y
src/pl/plpgsql/src/pl_scanner.c