Executing script file

Поиск
Список
Период
Сортировка
От Tumurbaatar S.
Тема Executing script file
Дата
Msg-id 000e01c4212a$9eac6de0$13670296@TUMURS
обсуждение исходный текст
Ответы Re: Executing script file  (Chris <list@1006.org>)
Re: Executing script file  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
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 following
commands like 'CREATE TABLE' and etc run on the current db, i.e.
not in context of newly created db. Any ideas?

P.S. Some RDBMS automatically switches to a newly created db
after 'CREATE DATABASE' and some other languages have command
like 'USE' to switch to a different db.


В списке pgsql-general по дате отправления:

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: specifics about BIT(n) types
Следующее
От: Chris
Дата:
Сообщение: Re: Executing script file