On Apr 11, 2009, at 10:15 AM, lists@xxxxxxxxx wrote:
So, how does needing to connect to a database before querying about
existing databases make any sense?
Well, you have to connect to the database server, no matter what, in
order to check on the existence of a database (unless you are doing it
by groveling around in the data directories). The fact that you have
to supply a database as part of that connection seems unremarkable.
Suppose the documentation said something along these lines:
"All connections are to a specific database. For operations in which
a user-created database would be inappropriate (such as checking for
the existence of a user-created database), the database 'root' is
created by initdb as a known default for such operations."
That would seem to be utterly uncontroversial and normal, yes?
OK s/root/template1/, and you're set. :)
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general