grouping treated as keyword in function return table
От | Mike Porter |
---|---|
Тема | grouping treated as keyword in function return table |
Дата | |
Msg-id | alpine.OSX.2.20.1607121145281.45959@qbp.aff.hqry.rqh обсуждение исходный текст |
Ответы |
Re: grouping treated as keyword in function return table
|
Список | pgsql-bugs |
Postgres 9.5.3 built from source. However, I think this has been happening for a long time. create function a() returns table( grouping integer ) language sql as $$ select 1; $$; ERROR: syntax error at or near "grouping" LINE 1: create function a() returns table( grouping integer ) langua... If we quote "grouping" ^ create function a() returns table( "grouping" integer ) language sql as $$ select 1; $$ ; CREATE FUNCTION grouping is a valid column in a table and does not need to be quoted: create temp table test( grouping integer ); CREATE TABLE 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. Additionally, pg_dumpall does not quote grouping when dumping the function so the function will not be restored when the dump is loaded. Thanks, Mike - Mike Porter PGP Fingerprint: F4 AE E1 9F 67 F7 DA EA 2F D2 37 F3 99 ED D1 C2
В списке pgsql-bugs по дате отправления: