Re: alter user/role CURRENT_USER
| От | Tom Lane |
|---|---|
| Тема | Re: alter user/role CURRENT_USER |
| Дата | |
| Msg-id | 9875.1414702785@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: alter user/role CURRENT_USER (Stephen Frost <sfrost@snowman.net>) |
| Список | pgsql-hackers |
Stephen Frost <sfrost@snowman.net> writes:
> The other idea which comes to mind is- could we try to actually resolve
> what the 'right' answer is here, instead of setting a special value and
> then having to detect and fix it later?
No, absolutely not. Read the NOTES at the head of gram.y. Or if you
need it spelled out: when we run the bison parser, we may not be inside a
transaction at all, and even if we are, we aren't necessarily going to
be seeing the same current user that will apply when the parsetree is
ultimately executed. (Consider a query inside a plpgsql function, which
might be called under multiple userids over the course of a session.)
I think Alvaro's suggestion is a perfectly appropriate solution.
regards, tom lane
В списке pgsql-hackers по дате отправления: