Re: Case sensitive grant statements in pg14?

Поиск
Список
Период
Сортировка
От richard coleman
Тема Re: Case sensitive grant statements in pg14?
Дата
Msg-id CAGA3vBvWwg21=YawST0AA5-_Gd-niCMnxrORN7=Pj_-nT_MP+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Case sensitive grant statements in pg14?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Case sensitive grant statements in pg14?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Tom, 

The items in { } are just placeholders for actual values.  If the schema name was my_schema and the role name was bob, I could have written instead:
grant create, usage on schema my_schema to bob;

but I had thought that using {schema_name} and {role} as place holders for any valid schema and any valid role would be more concise.
It appears that I was mistaken.

I am having instances of (substituting example names for schema and role):
 grant create, usage on schema my_schema to bob;

returning the error message:
ERROR: syntax error at or near "bob"

but:
GRANT CREATE, USAGE ON SCHEMA my_schema TO bob;

succeeding.

I hope that's clearer.

rik.


On Thu, Dec 21, 2023 at 1:36 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
richard coleman <rcoleman.ascentgl@gmail.com> writes:
> grant create, usage on schema {schema_name} to {role};

> fails with the error:
> ERROR: syntax error at or near "{role}"

> but by changing the capitalization of the statement to:
> GRANT CREATE, USAGE ON SCHEMA {schema_name} TO {role};

> completes successfully.

What are you expecting will replace "{role}" with something
valid?  Whatever that is is apparently somehow dependent
on the context being upper-case.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Case sensitive grant statements in pg14?
Следующее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: Error: Package: postgresql13-devel-13.13-1PGDG.rhel7.x86_64