Re: Connection.setCatalog()

From: jason(at)netspade(dot)com
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection.setCatalog()
Date: 2001-07-16 23:34:21
Message-ID: 5438518.995326461799.JavaMail.jason@www2.kc.aoindustries.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

[[[ Original Message from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> ]]]

> jason(at)netspade(dot)com writes:
> > Do you know whether PostgreSQL will support the catalogname.tablename
> > syntax in SQL queries in the future?
>
> Schema support is on the to-do list. It's probably too late to imagine
> that it will get done for 7.2, but maybe for 7.3.
>
> Although the details haven't been argued out yet, I suspect that the
> existing concept of independent databases within an installation will
> remain in place (for backwards compatibility if nothing else).
> SQL-style schemas and catalogs will exist as new naming levels
> *within* what we now call a database.

I see - I didn't realise this. As this is the case, there is no need for my database tool to list available databases since databases in postgresql are clusters. Thanks for clarifying that.

> Peter E. has previously commented that Postgres databases correspond
> most closely to the SQL concept of "catalog cluster", not "catalog".
> This agrees with my reading of SQL92 4.13:
>
> A cluster is an implementation-defined collection of catalogs.
> Exactly one cluster is associated with an SQL-session and it
> defines the totality of the SQL-data that is available to that
> SQL-session.
>
> Schemas and catalogs will exist within a database, and there will
> still be no possibility of cross-database accesses (but, hopefully,
> much less need for it either).

Good. As long as everything conforms to some kind of standard we're okay :)

> While I haven't followed this discussion closely, it appears to me that
> you are trying to make setCatalog reconnect to a new database --- ie, a
> new cluster in SQL terminology. I think this is a bad idea, as it will
> create a backwards compatibility problem once we have actual catalogs
> for setCatalog to work with. I'd suggest that the right short-term
> thing is for setCatalog to either do nothing or throw an error.

I agree. In which case the update Peter E did to DatabaseMetaData.getCatalogs() should be backed out. At least I've learnt how to use CVS and how to make context diffs :)
>
> regards, tom lane

Jason Davies

jason(at)netspade(dot)com

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas O'Dowd 2001-07-17 01:39:19 Re: Methode is not yet implemented.
Previous Message Tom Lane 2001-07-16 23:17:14 Re: Connection.setCatalog()