From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Porter <mike@udel.edu>
Cc: pgsql-bugs@postgresql.org
Subject: Re: grouping treated as keyword in function return table
Date: Tue, 12 Jul 2016 12:58:20 -0400
Message-ID: <26785.1468342700@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.OSX.2.20.1607121225380.45959@qbp.aff.hqry.rqh>
References: <alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh>
<24492.1468339572@sss.pgh.pa.us>
<alpine.OSX.2.20.1607121225380.45959@qbp.aff.hqry.rqh>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Mike Porter <mike@udel.edu> 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
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mike@udel.edu
Subject: Re: grouping treated as keyword in function return table
In-Reply-To: <26785.1468342700@sss.pgh.pa.us>
References: <alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh> <24492.1468339572@sss.pgh.pa.us> <alpine.OSX.2.20.1607121225380.45959@qbp.aff.hqry.rqh> <26785.1468342700@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