I would even say, "select datname from pg_database where not datistemplate", becuase otherwise pg_dump will complain about template0
Cheers, Ilia Chipitsine
U can use : select datname from pg_database;
in order to get the list of databses
HTH
Najib.
----- Original Message ----- From: "Ilia Chipitsine" <[EMAIL PROTECTED]> To: "Najib Abi Fadel" <[EMAIL PROTECTED]> Sent: Thursday, September 16, 2004 10:41 AM Subject: Re: [GENERAL] pg_dump in cycle
inUse pg_dump instead of pg_dumpall
example: pg_dump databaseName > databaseDumpFile
if u have many databases, you can make a script that dumps each databasebroadcast)---------------------------
sure, I have many databases. how can I write such script without explicitly specifying database names ? I do not want to modify that script after I have added database.
it's own file ....
----- Original Message ----- From: "Ilia Chipitsine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 16, 2004 8:08 AM Subject: [GENERAL] pg_dump in cycle
Dear Sirs,
I want to dump all databases, but separately each database in its own file, not all databases in one single file as pg_dumpall does.
How can I implement that ?
Cheers, Ilia Chipitsine
---------------------------(end ofTIP 4: Don't 'kill -9' the postmaster
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])