Re: Connect without specifying a database?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Connect without specifying a database?
Дата
Msg-id 3121.1239474305@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Connect without specifying a database?  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Sam Mason <sam@samason.me.uk> writes:
> As others have said; the design of PG is such that it's built to assume
> you're always connected to exactly one database.  I'd guess this is an
> artifact from a long time ago when PG didn't have multiple databases.

It's possible that that was true way back in Berkeley prehistory; there
is no one around the project now that would remember (unless maybe Elein
does).  But the key points here are that critical catalogs like pg_class
and pg_proc are per-database, which is a good thing for quite a number
of reasons, and PG is sufficiently catalog-driven that it's literally
impossible for the engine to do anything useful without having a set of
those catalogs available.  (Offhand, the only user-visible functionality
I can think of that isn't catalog-dependent is the GUC parameters, ie
SET/SHOW; and even within that there are some individual parameters
that can't meaningfully be set without catalog access.)

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "lists@mgreg.com"
Дата:
Сообщение: Re: Connect without specifying a database?
Следующее
От: "Gerry Scales"
Дата:
Сообщение: Maximum number of columns in a table