Re: grouping treated as keyword in function return table
От
Tom Lane
Тема
Re: grouping treated as keyword in function return table
Дата
Msg-id
26785.1468342700@sss.pgh.pa.us
Ответ на
Re: grouping treated as keyword in function return table (Mike Porter)
Список
Дерево обсуждения
grouping treated as keyword in function return table Mike Porter <mike@udel.edu>
Re: grouping treated as keyword in function return table Tom Lane <tgl@sss.pgh.pa.us>
Re: grouping treated as keyword in function return table Mike Porter <mike@udel.edu>
Re: grouping treated as keyword in function return table Tom Lane <tgl@sss.pgh.pa.us>
Re: grouping treated as keyword in function return table Mike Porter <mike@udel.edu>
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
В списке pgsql-bugs по дате отправления