information_schema vs temp tables (was Re: [COMMITTERS] pgsql: Sequences were not being shown due to the use of lowercase `s`)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема information_schema vs temp tables (was Re: [COMMITTERS] pgsql: Sequences were not being shown due to the use of lowercase `s`)
Дата
Msg-id 20915.1158191726@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Sequences were not being shown due to the use of lowercase `s`  ("Greg Sabino Mullane" <greg@turnstep.com>)
Ответы Re: information_schema vs temp tables (was Re: [COMMITTERS] pgsql: Sequences were not being shown due to the use of lowercase `s`)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> ... I can't think of a use case where a user would not want to
> append a "is_visible" clause to the query above. That or start
> tracking which pg_temp_ schema belongs to whom.

Well, I'm still having a problem with this, because it seems like a
pretty klugy solution.  It's inefficient (the is_visible functions
are not cheap) and it's not hard to fool:
set search_path = pg_temp_N, ...

(This won't work for a non-superuser, because he'll not have USAGE
privilege on someone else's temp schema, but you seem to be worried
about hiding temp tables from superusers.)

If you're really intent on making it work this way, my vote is to
expose namespace.c's isOtherTempNamespace() as a SQL-callable function,
and add a test on that to the info-schema views, rather than relying on
is_visible or explicit knowledge of the temp-schema naming convention.

Perhaps we should expose bothpg_is_my_temp_schema(schema_oid)pg_is_other_temp_schema(schema_oid)

Thoughts?  Opinions about the function names?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch attribution and non-ASCII characters
Следующее
От: Arturo Perez
Дата:
Сообщение: Re: Fixed length data types issue