From: | Daniil Davydov <3danissimo(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Steven Niu <niushiji(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Forbid to DROP temp tables of other sessions |
Date: | 2025-03-17 17:58:45 |
Message-ID: | CAJDiXgigY2TDdgk3T52ur1UZobAaZf714jWcmf1KSRLZ=yPxdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Mon, Mar 17, 2025 at 10:09 PM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Monday, March 17, 2025, Daniil Davydov <3danissimo(at)gmail(dot)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 not its 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
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Fix-accessing-other-sessions-temp-tables.patch | text/x-patch | 5.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-03-17 18:04:08 | Re: Update Unicode data to Unicode 16.0.0 |
Previous Message | Tom Lane | 2025-03-17 17:56:49 | Re: dead code in pg_upgrade |