Reference on partial data

From: mito <milos(dot)orszag(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Reference on partial data
Date: 2009-04-19 11:57:20
Message-ID: gsf3is$1upe$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
is it possible to create reference constraint only on defined subset of
data?

Reference can be defined on column which has unique constraint. It is
also possible to create partial unique index. So it should by possible
to reference this column. But postgres can not see this constraint and
raises: ERROR: there is no unique constraint matching given keys for
referenced table

Any ideas ???

I dont feel my self to rewrite builtin trigger function which ensures
reference integrity.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-04-19 13:18:54 Re: Recursive plpgsql function in rule
Previous Message mito 2009-04-19 11:08:43 Recursive plpgsql function in rule