Re: Quesion about querying distributed databases

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Kevin Stephenson <kjs714(at)hotmail(dot)com>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "sn(dot)1361(at)gmail(dot)com" <sn(dot)1361(at)gmail(dot)com>
Subject: Re: Quesion about querying distributed databases
Date: 2025-03-29 15:09:11
Message-ID: 67241bb8-52ac-40c5-a826-63f9c24590bf@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/29/25 02:15, Kevin Stephenson wrote:
> Bumping this old thread to clarify a few points.
>
> As an initial note on terminology, a "server" can be called a server, an
> instance, a server instance, or in PostgreSQL's (PG hereafter) case, a
> "DB Cluster." They all are used interchangeably in the wild to mean the
> same thing, with perhaps "server" being the most ambiguous. And that
> thing is a running process that is listening to (typically) a single
> port and handing connections off to individual threads or processes (or
> some other construct). The comments below use the word "instance" for
> consistency and brevity.
>
> MariaDB
> As mentioned by others, MariaDB (and MySQL proper, both hereafter
> referred to as MySQL) instances only support a single database. The
> CREATE DATABASE statement is a de facto synonym for CREATE SCHEMA (it is
> disappointing that MySQL and MariaDB docs still do not mention this
> significant fact). To disabuse those who believe MySQL support multiple

Actually they do:

https://dev.mysql.com/doc/refman/9.2/en/create-database.html

"CREATE DATABASE creates a database with the given name. To use this
statement, you need the CREATE privilege for the database. CREATE SCHEMA
is a synonym for CREATE DATABASE."

https://mariadb.com/kb/en/create-database/

"CREATE DATABASE creates a database with the given name. To use this
statement, you need the CREATE privilege for the database. CREATE SCHEMA
is a synonym for CREATE DATABASE."

They don't expound on what that means in real terms.

> databases, query any of the INFORMATION_SCHEMA tables and for all those
> that have the *_CATALOG column (CATALOG is a synonym for DATABASE),
> notice every row in every table that shows a catalog column, they all
> say "def", as in default. Further, the identifier used in CREATE
> DATABASE will show up in INFORMATION_SCHEMA tables in *_SCHEMA columns.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2025-03-31 03:10:21 Re: Querying one partition in a function takes locks on all partitions
Previous Message Kevin Stephenson 2025-03-29 09:15:28 Re: Quesion about querying distributed databases