Re: Oracle Style packages on postgres

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Rod Taylor <pg(at)rbt(dot)ca>, pgsql-hackers(at)postgresql(dot)org, Dave Held <dave(dot)held(at)arraysg(dot)com>
Subject: Re: Oracle Style packages on postgres
Date: 2005-05-11 21:56:04
Message-ID: 20050511215604.GD31103@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 11, 2005 at 05:43:32PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <decibel(at)decibel(dot)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(at)decibel(dot)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?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-05-11 21:59:44 Re: Oracle Style packages on postgres
Previous Message Josh Berkus 2005-05-11 21:55:46 Re: New Contrib Build?