> -----Original Message-----
> From: Fernando Nasser
>
> Hiroshi Inoue wrote:
> >
> > Tom Lane wrote:
> > >
> > > 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.
> >
> > Probably I can do it in many cases but I couldn't force others
> > to do it. I don't object if PostgreSQL doesn't allow unqualified
> > table name other than in public/temporary/catalog schema.
> > There's no ambiguity and there's no need for the CURRENT schema.
> >
>
> We can't do that. Accordingly to the SQL if you are user HIROSHI
> and write "SELECT * FROM a;" the table is actually "HIROSHI.a".
>
> This must work for people who are using SQL-schemas in their databases
> or we would have a non-conforming implementation of SCHEMAS (would make
> the whole exercise pointless IMO).
Schema name isn't necessarily a user id since SQL-92
though SQL-86 and SQL-89 had and probably Oracle still
has the limitation. As far as I see PostgreSQL's schema
support wouldn't have the limitation. Probably I wouldn't
create the schema HIROSHI using PostgreSQL. When
I used Oracle I really disliked the limitation.
> The path proposed by Tom (discussed in the list some time ago) actually
> does magic:
The seems a misuse of SQL-path to me.
If I restrict the path to temporary:CURRENT schema:catalog, I would be
able to use the CURRENT schema and I can see no other useful way in
unqualified table name resolution. Probably I would also be able to use the
path as SQL-path. But how can I use the path in both style simultaneously ?
regards,
Hiroshi Inoue