Re: Comparison of PGSQL and DB2

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: josh(at)postgresql(dot)org, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Shashank Joshi <shashyajoshi(at)yahoo(dot)com>, pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Comparison of PGSQL and DB2
Date: 2004-03-13 23:13:08
Message-ID: 200403140013.08546.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

Josh Berkus wrote:
> ?? I'm pretty sure that the SQL spec puts database at the top of the
> heirarchy tree, and treats them as inviolate.

Here are some relevant sections from SQL92. (SQL99 rearranged this and
I can't quite see through it, but certainly they didn't add any restrictions.)

4.12 Catalogs

Catalogs are named collections of schemas in an SQL-environment. An
SQL-environment contains zero or more catalogs. A catalog con-
tains one or more schemas, but always contains a schema named
INFORMATION_SCHEMA that contains the views and domains of the
Information Schema. The method of creation and destruction of
catalogs is implementation-defined. The set of catalogs that
can be referenced in any SQL-statement, during any particular
SQL-transaction, or during the course of an SQL-session is also
implementation-defined. The default catalog for a <module> whose
<module authorization clause> does not specify an explicit <cata-
log name> to qualify the <schema name> is implementation-defined.
The default catalog for <preparable statement>s that are dynami-
cally prepared in the current SQL-session through the execution
of <prepare statement>s and <execute immediate statement>s is ini-
tially implementation-defined but may be changed by the use of <set
catalog statement>s.

4.13 Clusters of catalogs

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.

An instance of a cluster is described by an instance of a defi-
nition schema. Given some SQL-data object, such as a view, a con-
straint, a domain, or a base table, the definition of that object,
and of all the objects that it directly or indirectly references,
are in the same cluster of catalogs. For example, no <referential
constraint definition> and no <joined table> can "cross" a cluster
boundary.

Whether or not any catalog can occur simultaneously in more than
one cluster is implementation-defined.

Within a cluster, no two catalogs have the same name.

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Jan Wieck 2004-03-14 14:38:47 Re: The big MySQL spin
Previous Message Neil Conway 2004-03-13 21:00:38 Re: Comparison of PGSQL and DB2