Can I habe multi table indices?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Can I habe multi table indices?
Date: 2015-02-02 09:44:10
Message-ID: 54CF46EA.5080205@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
can I habe multi table indices to ensure that certain IDs can only
appear in on relation?

Like

table_0(id int), table_1(id int), table_2(id int)
rel_1_to_0( id_1 int, id_0 int )
rel_2_to_0( id_2 int, id_0 int )

An id of table_0 should only exist either in rel_1_to_0 OR rel_2_to_0.

How can I do this?

regard
Andreas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Gordon Rutherdale 2015-02-02 09:46:46 Re: Problem with REFERENCES on INHERITS
Previous Message hubert depesz lubaczewski 2015-02-02 08:40:56 Re: How do I bump a row to the front of sort efficiently