Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bN10u-0001Uf-Qx for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Jul 2016 16:58:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bN10u-0002Ka-75 for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Jul 2016 16:58:28 +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 1bN10t-0002Jq-6Y for pgsql-bugs@postgresql.org; Tue, 12 Jul 2016 16:58:27 +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 1bN10q-0006NY-1r for pgsql-bugs@postgresql.org; Tue, 12 Jul 2016 16:58:26 +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 u6CGwKQ7026786; Tue, 12 Jul 2016 12:58:20 -0400 From: Tom Lane To: Mike Porter cc: pgsql-bugs@postgresql.org Subject: Re: grouping treated as keyword in function return table In-reply-to: References: <24492.1468339572@sss.pgh.pa.us> Comments: In-reply-to Mike Porter message dated "Tue, 12 Jul 2016 12:44:50 -0400" Date: Tue, 12 Jul 2016 12:58:20 -0400 Message-ID: <26785.1468342700@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-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Mike Porter writes: > On Tue, 12 Jul 2016, Tom Lane wrote: >> Only since 9.5, because GROUPING wasn't a keyword before that. > I noticed that grouping is fully quoted in all the tables in the > dump. Will grouping be a fully reserved word at some point? Well, we won't voluntarily make it so, but the SQL committee seems not to care when inventing new syntax whether it requires fully reserving new keywords to make it work. So it's a matter of what they do and whether we decide we want to adopt the feature/syntax. As far as dumps go, our default practice is to quote any non-unreserved keyword; it's not worth the trouble to decide for partially-reserved words whether they'd really need to be quoted in the specific context. >> Sure you're using 9.5 pg_dump? > My notes say so. > /usr/local/postgresql-9.5.3/bin/pg_dumpall -h a.server -U postgres > 9.5.3.sql Hm, is the source server 9.5? I think that the TABLE clause is actually generated server-side in this case. When you're making a dump you intend to load into a different server version, we recommend using --quote-all-identifiers to make sure you're not blindsided by identifiers that have become reserved words in the newer server version. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs