From: | richard coleman <rcoleman(dot)ascentgl(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Case sensitive grant statements in pg14? |
Date: | 2023-12-21 18:45:38 |
Message-ID: | CAGA3vBvWwg21=YawST0AA5-_Gd-niCMnxrORN7=Pj_-nT_MP+Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> richard coleman <rcoleman(dot)ascentgl(at)gmail(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Wetmore, Matthew (CTR) | 2023-12-21 19:13:42 | Error: Package: postgresql13-devel-13.13-1PGDG.rhel7.x86_64 |
Previous Message | Tom Lane | 2023-12-21 18:36:26 | Re: Case sensitive grant statements in pg14? |