Re: forcing a table (parent in inheritance) tor emain empty - Mailing list pgsql-general

From Rémi Cura
Subject Re: forcing a table (parent in inheritance) tor emain empty
Date
Msg-id CAJvUf_vvgjQpF5ak_THOjACLs2mqmNtVbeWxH1pY9wbUUuTznA@mail.gmail.com
Whole thread Raw
In response to Re: forcing a table (parent in inheritance) tor emain empty  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
List pgsql-general
Perfect !

Cheers,
Rémi C

2016-10-11 19:12 GMT+02:00 Julien Rouhaud <julien.rouhaud@dalibo.com>:
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

pgsql-general by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: forcing a table (parent in inheritance) tor emain empty
Next
From: Francisco Olarte
Date:
Subject: Re: My DB has has 5TB, many operations are very slow (on Google Cloud Compute)