Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMhXk-0000kF-T7 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2016 20:11:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bMhXj-0007bm-Ai for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2016 20:11:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bMhWL-00062U-Kk for pgsql-hackers@postgresql.org; Mon, 11 Jul 2016 20:09:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bMhWE-00058e-Ea for pgsql-hackers@postgresql.org; Mon, 11 Jul 2016 20:09:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6BK9RmY000512; Mon, 11 Jul 2016 16:09:27 -0400 From: Tom Lane To: Merlin Moncure cc: PostgreSQL-development Subject: Re: IMPORT FOREIGN SCHEMA can't be run in in pl/pgsql due to INTO In-reply-to: References: Comments: In-reply-to Merlin Moncure message dated "Mon, 11 Jul 2016 14:14:16 -0500" Date: Mon, 11 Jul 2016 16:09:27 -0400 Message-ID: <511.1468267767@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Merlin Moncure 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