Re: observations about temporary tables and schemas

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: observations about temporary tables and schemas
Дата
Msg-id 303E00EBDD07B943924382E153890E5434A9D3@cuthbert.rcsinc.local
обсуждение исходный текст
Ответ на observations about temporary tables and schemas  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Ответы Re: observations about temporary tables and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <Tom Lane> writes:
>The SQL spec's notion of temp tables is only tenuously related to ours
>in the first place :-(.  However, the spec appears to require that
>references to temp tables be unqualified names, so AFAICT it's not
>expected that applications can reference more than one schema's worth
>of temp tables anyway.

ISTM that if use of qualified names is disallowed you shouldn't be
allowed to create a temporary table with the same name as an existing
table.  Otherwise you have an unclear (or arbitrary) definition of which
table is used in an unqualified reference.  In this case, I think the
SQL spec was not thought out very well.  In my way of thinking,
temporary tables should behave just like normal tables wrt name
resolution.

Also, it's worth noting that qualified names for temp tables are an
allowed syntax except during the create table statement (although in
normal circumstances you would never know the namespace).  Because of
this, qualified name restriction appears to feel like an arbitrary
exclusion.

I did not see a TODO item regarding global temporary tables...has this
been attempted/done?

Regards,
Merlin



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

Предыдущее
От: "Richard Hall"
Дата:
Сообщение: Re: massive quotes?
Следующее
От: Alvaro Herrera Munoz
Дата:
Сообщение: Re: Compiling HP-UX 10.20