From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: database redesign |
Date: | 2013-11-08 20:24:34 |
Message-ID: | CAL_0b1v2F+NxpYMkzCAaujTiL1vrO0Lv11T3kRK-d4Qqk=4PxQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Nov 8, 2013 at 12:09 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> On 11/8/2013 11:44 AM, zach cruise wrote:
>> anyway, on database reorganization - is it recommended to group all
>> sequences and domains under one public schema? or is a sequence tied to a
>> table as its counter?
>
> I would keep sequences in the same schema as the related table. anything
> else is chaotic. if a domain is used by all the schemas, then putting it
> in public makes sense, otherwise, if its just used by one schema, it should
> logically be part of that schema.
I would also like to suggest using serial/bigserial types instead of
integer/bigint + sequence. This will automatically create a sequence
that is depended on the table.
--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA
http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray(dot)ru(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-11-09 01:51:59 | Re: Unary Operators |
Previous Message | John R Pierce | 2013-11-08 20:09:38 | Re: database redesign |