Re: PostgreSQL :: Catalog Query

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: Yogi S <infayogi(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: PostgreSQL :: Catalog Query
Date: 2018-07-18 12:52:53
Message-ID: 046cb876-a4b7-f24d-f5d6-67482755fea2@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Yogi S schrieb am 18.07.2018 um 12:22:
> this might look quite naive. but I see quite a difference in between other RDBMS database vs PostgreSQL.
> usually the categorization of the entities are like what is stated below. I am sure mysql follows the same.
>
> Cluster --> Catalog --> database --> Schema --> tables
>
> but in postgreSQL the catalog <--> database relation is quite one-to-one.
> Question is, is it safe to assume that postgreSQL does not have any /*catalog concept*/ as such.

As far as the SQL standard is concerned Postgres' databases do map to the term "catalog" .

The only difference (or deviation from the standard) is, that they are no real "namespaces".
In the SQL standard a fully qualified (table) name consists of three parts:

catalog.schema.table

however in Postgres the catalog (while it exists as a "thing") is not allowed to be used in a fully qualified name.

So in Postgres it's indeed:

"Cluster" (or "Instance") -> Databases -> Schemas -> Tables

MySQL only has databases (or catalogs) but no schemas - or schemas, but no catalogs as "database" is a synonym for "schema" there.
And MySQL has no "cluster" the way the term is used in Postgres. So in MySQL it's only

"Instance" -> Databases -> Tables

Note that in Oracle this is again completely different. And in DB2.

The only DBMS I know of that actually supports these two namespaces (catalogs, schemas) completely is SQL Server (a catalog is called a "database" there)

But this shouldn't be posted or discussed on the "bugs" mailing list, as it is not a bug.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-07-18 12:59:19 BUG #15283: Query Result equal 0 for partitioned table
Previous Message Yogi S 2018-07-18 10:22:15 PostgreSQL :: Catalog Query