Re: move from 1 database to another

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: move from 1 database to another
Дата
Msg-id AFFFB652-1374-4583-8075-67CAE8EF9DF7@pervasive.com
обсуждение исходный текст
Ответ на move from 1 database to another  ("P.M" <pmdanger@yahoo.com>)
Ответы Re: move from 1 database to another  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On May 25, 2006, at 1:52 PM, P.M wrote:
> I would like to know how can i move from 1 database to another one ?
>
> basically i want to run a *.sql script in which i connect under a
> particular database (for example : template1 or postgres) and my
> *.sql script should create a new database (for example : test) and
> after execute several SQL command under test database.

CREATE DATABASE new_database TEMPLATE = database_to_copy;
-- Insert additional SQL here...

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Best practice to grant all privileges on all bjects in database?
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: What to expect when mixing inherited tables and different schemas while dealing with functions and views?