Re: Temp table visibility

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Temp table visibility
Date: 2011-08-05 13:05:51
Message-ID: 20110805130551.GC49271@shinkuro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Aug 05, 2011 at 08:35:37AM -0400, JJ wrote:
> Hello all,
>
> I was recently looking at the way "create temp table as" works and the manual specifies that temp tables given the same name as an existing table will be used instead of the permanent table. It also states that the permanent table can be accessed via its schema-qualified name. I may have answered my own question but is there any way to emulate this table visibility functionality when referencing tables by their schema-qualified name?
> --

No, because the schema qualification is what makes for the visibility
functionality. To draw an analogy, suppose your $PATH includes
/usr/bin but not /usr/local/bin, and that you have two psql binaries,
one in /usr/bin and one in /usr/local/bin. If you type psql, you get
the one in /usr/bin. If you type /usr/local/bin/psql, you always get
that one, even though it's not in the $PATH. The $PATH doesn't affect
the visibility of the string |psql|, just adds an implicit way of
finding such a string if it's on the path somewhere.

A

--
Andrew Sullivan
ajs(at)crankycanuck(dot)ca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2011-08-05 13:30:59 Re: Select count with offset returns nothing.
Previous Message Ioana Danes 2011-08-05 12:51:07 Re: hstore installed in a separate schema