Re: [GENERAL] Schemas and serials - Mailing list pgsql-general

From Melvin Davidson
Subject Re: [GENERAL] Schemas and serials
Date
Msg-id CANu8FiznP7MFNaMuEoFVFceO8Nn69E2=J_AfRm-zMcP6d9dm0w@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Schemas and serials  (tel medola <tel.medola@gmail.com>)
Responses Re: [GENERAL] Schemas and serials  (marcelo <marcelo.nicolet@gmail.com>)
Re: [GENERAL] Schemas and serials  (marcelo <marcelo.nicolet@gmail.com>)
Re: [GENERAL] Schemas and serials  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general

On Sat, Jul 29, 2017 at 3:38 PM, tel medola <tel.medola@gmail.com> wrote:
Depends.
When you create your tables in new schema, the script was the same from "qa"?
Sequences, tables, etc.. belong to the schema where was created.

Roberto.

Em sáb, 29 de jul de 2017 às 16:17, marcelo <marcelo.nicolet@gmail.com> escreveu:
Some days ago I asked regarding tables located in different schemas.
Now, my question is
Suppose I have two schemas (other than public): "qa" and "production".
Initially I create all my tables in "qa". All of them have a primary key
of type serial.
Later, I will copy the tables definitions to production.
It will automatically create the sequences in the new schema, starting
at zero?
TIA
Marcelo


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Marcelo,
>Initially I create all my tables in "qa". All of them have a primary key of type serial.
>Later, I will copy the tables definitions to production.

A word of caution, creating tables in a qa "schema" and then transferring to production is not the normal/correct (or safe) way to do development.
The standard procedure is to create a seperate "qa" database (and/or server) with the exact same schema(s) as production. Then, after testing
is completed, the schemas/tables are copied to production.

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: tel medola
Date:
Subject: Re: [GENERAL] Schemas and serials
Next
From: Gabriel Furstenheim Milerud
Date:
Subject: [GENERAL] Executing regex in C code