Re: What's the CURRENT schema ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: What's the CURRENT schema ?
Date
Msg-id 19576.1017973267@sss.pgh.pa.us
Whole thread Raw
In response to Re: What's the CURRENT schema ?  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Responses Re: What's the CURRENT schema ?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> I don't object to use a search path to resolve unqualified
> function, type etc names. But it is very siginificant for
> users to be able to be sure what tables they are handling.

I really don't buy this argument; it seems exactly comparable to
arguing that the notion of current directory in Unix is evil, and
that users should be forced to specify absolute paths to every
file that they reference.

There is nothing to stop you from writing qualified names (schema.table)
if you are concerned about being sure that you get the table you intend.
In practice, however, people seem to prefer relative pathnames in most
Unix commands, and I think they'll prefer unqualified names in SQL
commands as well.

> Where's the necessity to use a common search path to resolve
> table and other objects' name in the first place ? I don't
> know any OS commands which use the command search path to
> resolve ordinary file name.

I think that's because of security concerns.  I would not object to
having separate search paths for functions/operators and for
tables/datatypes, though, if that would make you happier.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Sketch for nonunique searches in syscaches
Next
From: Thomas Lockhart
Date:
Subject: Re: Datatype time PostGreSql 7.2.1