Re: oddity with ALTER ROLE/USER

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: oddity with ALTER ROLE/USER
Дата
Msg-id 32143.1550870350@sss.pgh.pa.us
обсуждение исходный текст
Ответ на oddity with ALTER ROLE/USER  (Joe Conway <mail@joeconway.com>)
Ответы Re: oddity with ALTER ROLE/USER  (Joe Conway <mail@joeconway.com>)
Re: oddity with ALTER ROLE/USER  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> I noticed that ALTER ROLE/USER succeeds even when called without any
> options:

> postgres=# alter user foo;
> ALTER ROLE
> postgres=# alter role foo;
> ALTER ROLE
> postgres=# alter group foo;
> ERROR:  syntax error at or near ";"
> LINE 1: alter group foo;

> That seems odd, does nothing useful, and is inconsistent with, for
> example, ALTER GROUP as shown above.

> Proposed patch attached.

If you want to make it act like alter group, why not make it act
like alter group?  That is, the way to fix this is to change the
grammar so that AlterOptRoleList doesn't permit an expansion with
zero list elements.

Having said that, I can't get excited about changing this at all.
Nobody will thank us for it, and someone might complain.

            regards, tom lane


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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: Temporal Table Proposal
Следующее
От: "Regina Obe"
Дата:
Сообщение: RE: CTE Changes in PostgreSQL 12, can we have a GUC to get old behavior