Re: Skip temporary table schema name from explain-verbose output. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Skip temporary table schema name from explain-verbose output.
Date
Msg-id 208118.1627324205@sss.pgh.pa.us
Whole thread Raw
In response to Re: Skip temporary table schema name from explain-verbose output.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Skip temporary table schema name from explain-verbose output.
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Oh, you meant this one.  To be honest I don't remember *why* this code
> wants to show remote temp tables as just "pg_temp" ... it's possible
> that some test in the DDL-to-JSON code depended on this behavior.
> Without spending too much time analyzing it, I agree that it seems
> dangerous and might lead to referring to unintended objects.  (Really,
> my memory is not clear on *why* we would be referring to temp tables of
> other sessions.)

Yeah, it's not very clear why that would happen, but if it does,
showing "pg_temp" seems pretty misleading.  I tried replacing the
code with just get_namespace_name_or_temp(), and it still gets
through check-world, for whatever that's worth.

I'm inclined to change this in HEAD but leave it alone in the back
branches.  While it seems pretty bogus, it's not clear if anyone
out there could be relying on the current behavior.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Arne Roland
Date:
Subject: Re: Rename of triggers for partitioned tables
Next
From: Robert Haas
Date:
Subject: Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)