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:06:12 -0400
Message-ID: <24492.1468339572@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh>
References: <alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Mike Porter <mike@udel.edu> writes:
> Postgres 9.5.3 built from source. However, I think this has been
> happening for a long time.
Only since 9.5, because GROUPING wasn't a keyword before that.
> So, in almost all cases grouping is not required to be quoted,
> however when used in a table defined as a function return type, it
> is.
This is expected given that it's now partially reserved.
> Additionally, pg_dumpall does not quote grouping when dumping
> the function so the function will not be restored when the dump is
> loaded.
That would be a pg_dump bug, but it doesn't happen for me: I get
CREATE FUNCTION a() RETURNS TABLE("grouping" integer)
LANGUAGE sql
AS $$ select 1; $$;
Sure you're using 9.5 pg_dump?
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: <24492.1468339572@sss.pgh.pa.us>
References: <alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh> <24492.1468339572@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