Re: Forbid to DROP temp tables of other sessions
От | Daniil Davydov |
---|---|
Тема | Re: Forbid to DROP temp tables of other sessions |
Дата | |
Msg-id | CAJDiXgigY2TDdgk3T52ur1UZobAaZf714jWcmf1KSRLZ=yPxdw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Forbid to DROP temp tables of other sessions ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: Forbid to DROP temp tables of other sessions
Re: Forbid to DROP temp tables of other sessions |
Список | pgsql-hackers |
Hi, On Mon, Mar 17, 2025 at 10:09 PM David G. Johnston <david.g.johnston@gmail.com> wrote: > > On Monday, March 17, 2025, Daniil Davydov <3danissimo@gmail.com> wrote: >> >> >> > >> > 2."you have not any temporary relations" --> "you have no any temporary >> > relations" >> I am not an English speaker, but it seems that "have not" would be >> more correct. Someone has to judge us :) >> > > Both are not good. > > “pg_temp was specified but it contains no relations” [1] That sounds reasonable. I'll fix it. Thanks! > But why are we promoting this situation to an error? It should be a relation not found error just like any other and notits own special case. > The fact we create pg_temp only as it is needed is an implementation detail that should not be visible to the user. 1) Error message has no mention of a non-existent schema. "Schema has no relations" => "Given relation not found in empty schema". It seems to me that these are equivalent statements. 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. 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. Please see v4 patch (only comment change). -- Best regards, Daniil Davydov
Вложения
В списке pgsql-hackers по дате отправления: