> Currently I use 'psql -f file' to perform all needed DDL statements > except of create db. Because when I insert 'CREATE DATABASE' > at the beginning of the script, the server creates a db but following > commands like 'CREATE TABLE' and etc run on the current db, i.e. > not in context of newly created db. Any ideas? Use \c, like this: \c your_new_database Bye, Chris. ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly