Mike Porter <mike(at)udel(dot)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