Re: forcing a table (parent in inheritance) tor emain empty

From: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
To: Rémi Cura <remi(dot)cura(at)gmail(dot)com>, Manuel Gómez <targen(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: forcing a table (parent in inheritance) tor emain empty
Date: 2016-10-11 17:12:34
Message-ID: 2473c49d-567f-b71c-53c5-78289345af58@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/10/2016 19:04, Rémi Cura wrote:
> This solution is very nice.
> Sadly the check is inherited by the children
> (I only want the parent to be empty, not the children).
>
> It seems the element that are not inherited are
>
> * Indexes
> * Unique constraints
> * Primary Keys
> * Foreign keys
> * Rules and Triggers
>

you can specify a "NO INHERIT" on the check constraint, that should
solve your issue.

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rémi Cura 2016-10-11 17:41:28 Re: forcing a table (parent in inheritance) tor emain empty
Previous Message Rémi Cura 2016-10-11 17:04:00 Re: forcing a table (parent in inheritance) tor emain empty