From: | Bosco Rama <postgres(at)boscorama(dot)com> |
---|---|
To: | Melvin Call <melvincall979(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Understanding database schemas |
Date: | 2013-08-02 16:56:41 |
Message-ID: | 51FBE4C9.90509@boscorama.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Perry Smith | 2013-08-02 17:29:57 | TOC errors |
Previous Message | hamann.w | 2013-08-02 16:55:03 | Re: incremental dumps |