Re: Connection.setCatalog()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jason(at)netspade(dot)com
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection.setCatalog()
Date: 2001-07-16 23:17:14
Message-ID: 21652.995325434@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

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).

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.

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message jason 2001-07-16 23:34:21 Re: Connection.setCatalog()
Previous Message jason 2001-07-16 22:28:46 RE: Connection.setCatalog()