Re: [GENERAL] Executing script file

2004-04-13 Thread Richard Huxton
On Tuesday 13 April 2004 08:40, Tumurbaatar S. wrote: > Hi! > I cannot imagine how to create db from a script file and execute > other DDL statements on this new db. > P.S. Some RDBMS automatically switches to a newly created db > after 'CREATE DATABASE' and some other languages have command > lik

Re: [GENERAL] Executing script file

2004-04-13 Thread Chris
> 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

[GENERAL] Executing script file

2004-04-13 Thread Tumurbaatar S.
Hi! I cannot imagine how to create db from a script file and execute other DDL statements on this new db. 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 foll