Just out of curiosity: How would you programatically create a database in postgresql then?
Just out of curiosity: How would you programatically create a database in postgresql then?
As I say in my first post in this thread. On PostgreSQL server allways exist "service database" called postgres. In this database is saved dictionary of databases, tables, function, users etc.
With this queryYou retrieve list of all databases.Qt Code:
SELECT datname FROM pg_catalog.pg_databaseTo copy to clipboard, switch view to plain text mode
Very simple and effective mechanism.
JohannesMunk (7th April 2009)
Bookmarks