From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: IMPORT FOREIGN SCHEMA can't be run in in pl/pgsql due to INTO
Date: Mon, 11 Jul 2016 16:09:27 -0400
Message-ID: <511.1468267767@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0wpHf2bbtKGL1gtUEFATCY86r=VKxfcACVcTMQ70mCyig@mail.gmail.com>
References: <CAHyXU0wpHf2bbtKGL1gtUEFATCY86r=VKxfcACVcTMQ70mCyig@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Merlin Moncure <mmoncure@gmail.com> writes:
> Currently pl/pgsql interprets the mandatory INTO of IMPORT FOREIGN
> SCHEMA as INTO variable.
Ugh, that's definitely a bug.
> I estimate this to be minor oversight in
> pl/pgsql parsing with respect to the introduction of this statement.
While we can certainly hack it by something along the lines of not
recognizing INTO when the first token was IMPORT, the whole thing
seems awfully messy and fragile. And it will certainly break again
the next time somebody decides that INTO is le mot juste in some new
SQL command. I wish we could think of a safer, more future-proof
solution. I have no idea what that would be, though, short of
deprecating INTO altogether.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com
Subject: Re: IMPORT FOREIGN SCHEMA can't be run in in pl/pgsql due to INTO
In-Reply-To: <511.1468267767@sss.pgh.pa.us>
References: <CAHyXU0wpHf2bbtKGL1gtUEFATCY86r=VKxfcACVcTMQ70mCyig@mail.gmail.com> <511.1468267767@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox