Re: invalid search_path complaints - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: invalid search_path complaints
Date
Msg-id 20120410171041.GA13851@msgid.df7cb.de
Whole thread Raw
In response to Re: invalid search_path complaints  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: invalid search_path complaints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Re: Tom Lane 2012-04-04 <28647.1333558029@sss.pgh.pa.us>
> Now, Scott's comment seems to me to offer a principled way out of this:
> if we define the intended semantics of search_path as being similar
> to the traditional understanding of Unix PATH, then it's not an error
> or even unexpected to have references to nonexistent schemas in there.

Btw, the default setting does already work like this: "$user",public.
It is not an error for "$user" not to exist, but it is a very nice
default because it will be used as soon as it appears.

It would be logical to treat all other cases the same. I then could
put the search_path into my .psqlrc and then have a "one size fits
all" search path for all my databases, etc...

> But as soon as you say "I want warnings in some cases", I think we have
> a mess that nobody is ever going to be happy with, because there will
> never be a clear and correct definition of which cases should get
> warnings.

As it looks impossible to divide the gray area, I'd opt to just drop
the warning and accept all syntactically valid strings.

Christoph
--
cb@df7cb.de | http://www.df7cb.de/

pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: Re: plpython triggers are broken for composite-type columns
Next
From: Jim Nasby
Date:
Subject: Re: bug in fast-path locking