Re: grouping treated as keyword in function return table - Mailing list pgsql-bugs

From Tom Lane
Subject Re: grouping treated as keyword in function return table
Date
Msg-id 24492.1468339572@sss.pgh.pa.us
Whole thread Raw
In response to grouping treated as keyword in function return table  (Mike Porter <mike@udel.edu>)
Responses Re: grouping treated as keyword in function return table
List pgsql-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

pgsql-bugs by date:

Previous
From: Mike Porter
Date:
Subject: grouping treated as keyword in function return table
Next
From: Mike Porter
Date:
Subject: Re: grouping treated as keyword in function return table