Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y
Дата
Msg-id 8331.1501082956@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y  (Pavel Golub <pavel@microolap.com>)
Ответы Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y  (Pavel Golub <pavel@microolap.com>)
Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y  (Pavel Golub <pavel@microolap.com>)
Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Pavel Golub <pavel@microolap.com> writes:
> I need someone to throw some light on grammar (gram.y).
> I'm investigating beta2 regression tests, and found new statement

> `ALTER USER ALL SET application_name to 'SLAP';`
>             ^^^

You'll notice that that statement fails in the regression tests:

ALTER USER ALL SET application_name to 'SLAP';
ERROR:  syntax error at or near "ALL"

The one that works is

ALTER ROLE ALL SET application_name to 'SLAP';

and the reason is that AlterRoleSetStmt has a separate production
for ALL, but AlterUserSetStmt doesn't.  This seems a tad bizarre
though.  Peter, you added that production (in commit 9475db3a4);
is this difference intentional or just an oversight?  If it's
intentional, what's the reasoning?

BTW, I'm quite confused as to why these test cases (in rolenames.sql)
seem to predate that commit, and yet it did not change their results.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shubham Barai
Дата:
Сообщение: [HACKERS] GSoC 2017: weekly progress reports (week 8)
Следующее
От: Kunshchikov Vladimir
Дата:
Сообщение: Re: [HACKERS] [patch] pg_dump/pg_restore zerror() and strerror()mishap