Re: Understanding database schemas

Поиск
Список
Период
Сортировка
От Bosco Rama
Тема Re: Understanding database schemas
Дата
Msg-id 51FBE4C9.90509@boscorama.com
обсуждение исходный текст
Ответ на Understanding database schemas  (Melvin Call <melvincall979@gmail.com>)
Ответы Re: Understanding database schemas
Список pgsql-general
On 08/02/13 09:33, Melvin Call wrote:
>
> $ psql -U postgres
>
> DROP SCHEMA IF EXISTS hrschema CASCADE;
> DROP DATABASE IF EXISTS personnel;
> DROP USER IF EXISTS hr_admin;
>
> CREATE USER hr_admin
>    WITH CREATEDB
>    PASSWORD 'md5be394806d6a21c6c52aa2b76063c7d9d';
>
> DROP DATABASE IF EXISTS personnel;
> CREATE DATABASE personnel
>    WITH ENCODING='UTF8'
>    OWNER=hr_admin
>    TEMPLATE=template0
>    LC_COLLATE='C'
>    LC_CTYPE='C'
>    CONNECTION LIMIT=-1;
>
> CREATE SCHEMA hrschema
> AUTHORIZATION hr_admin;

You've created 'hrschema' schema in the 'postgres' database at this
point.

You'll need to connect to the 'personnel' database before issuing this
DDL command.  And since you are reconnecting, you may as well do it as
the 'hr_admin' user and skip the whole 'authorization' clause.

HTH,
Bosco.


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

Предыдущее
От: hamann.w@t-online.de
Дата:
Сообщение: Re: incremental dumps
Следующее
От: Perry Smith
Дата:
Сообщение: TOC errors