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/
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general