Re: schema creation during initdb

Поиск
Список
Период
Сортировка
От NikhilS
Тема Re: schema creation during initdb
Дата
Msg-id d3c4af540704180326v25b3382dx4eff0546359e1592@mail.gmail.com
обсуждение исходный текст
Ответ на Re: schema creation during initdb  ("sharath kumar" <k.sharat@gmail.com>)
Ответы Re: schema creation during initdb  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Hi,

On 4/18/07, sharath kumar <k.sharat@gmail.com> wrote:
Sorry i have put the question wrongly. I wanted to ask if we can create a schema during createdb time so that i have to hide the following from the user.
 psql -c 'create schema foo' mytemplate
 psql -c 'create table foo.bar ...' mytemplate
Whenever a user runs createdb command, the above schema and table should be created automatically.
Thanks,
Sharat.

One way that I can think of doing this would be by adding the details about the new schema and the tables that lie therein in the src/backend/catalog/information_schema.sql file (I dont know if this is the recommended way though). These will end up becoming a part of template1 and any subsequent databases that are created will contain them.

Regards,
Nikhils

--
EnterpriseDB               http://www.enterprisedb.com

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: schema creation during initdb
Следующее
От: Aidan Van Dyk
Дата:
Сообщение: Re: Hacking on PostgreSQL via GIT