Re: What's the CURRENT schema ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What's the CURRENT schema ?
Date: 2002-04-05 02:21:07
Message-ID: 19576.1017973267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-04-05 02:30:38 Re: Datatype time PostGreSql 7.2.1
Previous Message Tom Lane 2002-04-05 02:13:23 Sketch for nonunique searches in syscaches