Re: Connect without specifying a database?

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Connect without specifying a database?
Дата
Msg-id EFC2F29D-1B59-483E-A621-21420489689D@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на Re: Connect without specifying a database?  ("lists@mgreg.com" <lists@mgreg.com>)
Список pgsql-general
On Apr 11, 2009, at 6:10 PM, lists@mgreg.com wrote:

> What do you mean when you say the "catalogs...are database-
> specific" ?  If I'm understanding what you're saying, my whole point
> is that I don't want to be tied to a database to do any kind of
> querying about the PG engine itself.  Does that make sense?

Look at it from the other side; You have a DBMS and you want to store
information about what databases and which users are available, who
can and can't connect, etc. It makes sense to store that in a
database, right?

To request that information you need to connect to the database
server. Considering that information is stored in a database, having
to specify that database to connect to makes sense. Whether that's a
named database (with a documented fixed name of course, in this case
'template1' or 'postgres') or an anonymous database doesn't make much
difference. You'll still have to specify several other connection
parameters (host & port at least), so why not also a valid user (quite
desirable from a security point of view) and a database name?

It may not make as much sense from a user point of view, but it makes
a lot of sense from a database point of view.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,49e1ca98129741055947028!



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: No return from trigger function
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Partitioned table and trigger/insert result horribleness