From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: observations about temporary tables and schemas |
Date: | 2003-09-16 19:23:57 |
Message-ID: | 303E00EBDD07B943924382E153890E5434A9D3@cuthbert.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera Munoz | 2003-09-16 19:26:20 | Re: Compiling HP-UX 10.20 |
Previous Message | Tom Lane | 2003-09-16 18:55:14 | Re: observations about temporary tables and schemas |