Re: Temp table visibility
| От | Tom Lane | 
|---|---|
| Тема | Re: Temp table visibility | 
| Дата | |
| Msg-id | 2266.1312556108@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: Temp table visibility (Andrew Sullivan <ajs@crankycanuck.ca>) | 
| Ответы | 
                	
            		Re: Temp table visibility
            		
            		 | 
		
| Список | pgsql-general | 
Andrew Sullivan <ajs@crankycanuck.ca> writes:
> On Fri, Aug 05, 2011 at 08:35:37AM -0400, JJ wrote:
>> I was recently looking at the way "create temp table as" works and the manual specifies that temp tables given the
samename as an existing table will be used instead of the permanent table.  It also states that the permanent table can
beaccessed via its schema-qualified name.  I may have answered my own question but is there any way to emulate this
tablevisibility functionality when referencing tables by their schema-qualified name?  
> No, because the schema qualification is what makes for the visibility
> functionality.
Also, you can change the priority if you have a mind to, by adding
"pg_temp" to the search_path explicitly, for example
    SET search_path = public, pg_temp;
If there's no explicit reference to pg_temp in search_path then it's
implicitly searched first, which is why unqualified references to temp
table names work the way the manual says.
            regards, tom lane
		
	В списке pgsql-general по дате отправления: