(no subject)

From: Olivier Detour <detour(at)pimentech(dot)net>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: (no subject)
Date: 2000-10-04 17:59:31
Message-ID: 39DB7003.5495D4EA@pimentech.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have a problem with inheritance and references.

TABLE parent_table (
id_parent SERIAL PRIMARY KEY,
....
)

No primary key in child
TABLE child_parent (
.....
) INHERITS (parent_table);

And another table :
TABLE other_table (
ref_child_table INTEGER REFERENCES parent_table
);

Reference must be take on parent_table, as child_parent inherit
parent_table's primary key. On child_table, it doesn't work (No primary
key in child_table).

So, it's ok for creating, but I can't do INSERT into other_table because
postgresql search primary key into parent_table instead into
child_table.

How can I do this ?
Please Help...

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2000-10-04 18:14:15 Re: yacc guru needed
Previous Message Stephan Szabo 2000-10-04 17:18:56 Re: Solution for RI permission problem