Re: Forbid to DROP temp tables of other sessions
От | David G. Johnston |
---|---|
Тема | Re: Forbid to DROP temp tables of other sessions |
Дата | |
Msg-id | CAKFQuwZ-SPdwY1mCJp3XF+TdGqUNVN8FAatTu2npusXtoFf0uA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Forbid to DROP temp tables of other sessions (Daniil Davydov <3danissimo@gmail.com>) |
Список | pgsql-hackers |
On Mon, Mar 17, 2025 at 10:58 AM Daniil Davydov <3danissimo@gmail.com> wrote:
2)
Is this really the implementation detail that we want to hide from the
user? User can just run "select pg_my_temp_schema();" and see that
there is no temp schema in the current session.
No ordinary user uses that function; it serves no everyday usage need.
Don't get me wrong - I can agree with that, but for now it seems odd to me...
Steven Niu also mentioned this issue, but IMO we must give the most
accurate description of the problem - tell "relation not found" only
if we have temp namespace, but not specified relation in it.
"I want to give a better error message" is not a good enough reason to change this long-standing behavior in a back-patchable bug fix.
IOW, you don't get to change:
postgres=# select * from pg_temp.temp_table;
ERROR: relation "pg_temp.temp_table" does not exist
LINE 1: select * from pg_temp.temp_table;
ERROR: relation "pg_temp.temp_table" does not exist
LINE 1: select * from pg_temp.temp_table;
to
postgres=# select * from pg_temp.tmptable;
ERROR: pg_temp was specified but it contains no relations
LINE 1: select * from pg_temp.tmptable;
ERROR: pg_temp was specified but it contains no relations
LINE 1: select * from pg_temp.tmptable;
In a released branch; and I do not agree that it is an improvement worth making in HEAD.
David J.
В списке pgsql-hackers по дате отправления: