Re: [HACKERS] Creating temp tables inside read only transactions - Mailing list pgsql-general

From Craig Ringer
Subject Re: [HACKERS] Creating temp tables inside read only transactions
Date
Msg-id 4E180585.6060002@postnewspapers.com.au
Whole thread Raw
In response to Re: [HACKERS] Creating temp tables inside read only transactions  (Darren Duncan <darren@darrenduncan.net>)
List pgsql-general
On 9/07/2011 2:39 PM, Darren Duncan wrote:
> What if you used the context of the calling code and resolve in favor of
> whatever match is closest to it?

*BAD* idea IMHO.

It sounds attractive at first, but inevitably leads to problems where a
query used to work until someone creates a table/type/whatever that's
"closer" and suddenly things explode.

The existing search_path feature already suffers from issues like that,
and it's usually better to explicitly fully qualify names when you're
not just writing interactive code. The same potential foot-gun can be
exploited as an excellent and useful feature when you actually *want*
the same name to point to different things in different contexts, but in
general use it's more likely to create situations where change A breaks
unrelated query B.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Creating temp tables inside read only transactions
Next
From: Craig Ringer
Date:
Subject: Re: New feature: cached foreign keys