Re: Reference with inheritance propagate data - Mailing list pgsql-general

From Jeff Davis
Subject Re: Reference with inheritance propagate data
Date
Msg-id 1339544171.12295.105.camel@sussancws0025
Whole thread Raw
In response to Reference with inheritance propagate data  (Yuriy Rusinov <yrusinov@gmail.com>)
Responses Re: Reference with inheritance propagate data
List pgsql-general
On Wed, 2012-06-13 at 00:38 +0400, Yuriy Rusinov wrote:
> Hello, All !
>
> I have base table q_base_table with column (id bigint) which may be
> inherited by users tables, primary key for both base table and derived
> tables is id. Now I need for another table record_rubricator which has
> to be referenced to base and derived tables, which way I have to do
> it, because postgresql does not allow automatically propagate data ?

One foreign key cannot reference two tables.

Have you considered a design that does not use inheritance? For
instance, the users table could reference q_base_table, and then
record_rubricator could also reference q_base_table?

Also, I don't understand what you mean about propagating data. What data
do you want to propagate?

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: UPDATE Syntax Check
Next
From: Jeff Davis
Date:
Subject: Re: trigger on view returning created serial