Re: Oracle Style packages on postgres

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Oracle Style packages on postgres
Дата
Msg-id 20050511215604.GD31103@decibel.org
обсуждение исходный текст
Ответ на Re: Oracle Style packages on postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, May 11, 2005 at 05:43:32PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <decibel@decibel.org> writes:
> > On Wed, May 11, 2005 at 05:28:22PM -0400, Tom Lane wrote:
> >> No, actually, I was wondering where the potentially N levels of schema
> >> names would appear in the output ...
> 
> > My immediate thought is that they would be appended together in 'dot
> > notation'; 'schema1.schema2.schema3', since that's the definative way to
> > refer to the schema in such a scheme.
> 
> That's OK for human consumption but I'm not so sure it'll be of any
> value to programs.  At the very least you'd have to quotify the names,
> so that a.b can be told from "a.b".

Very true. Ultimately the best way to handle this is probably to keep
the views basically as they are (meaning you would only show the
schema_name and oid of the schema that an object is in), and have a
function that will provide you a full schema path given a schema_oid.

On another note... is dbname.schema.table.column part of the standard?
It seems like if we're ever going to allow native cross-database
communication we'd want to preserve that. One thought is the use of a
leading . to indicate you're starting at the database level. No leading
. means you're in whatever database you're connected to. Another
possibility is that 'remote' databases (which might be on the same
server) get mapped into a fixed portion of the namespace hierarchy, such
as pg_rdb. I don't like cryptic names, but I certainly don't want to
type 'pg_remote_databas' everytime I refer to something remote.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew - Supernews
Дата:
Сообщение: Re: Server instrumentation for 8.1
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Oracle Style packages on postgres