Re: Reference on partial data

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: mito <milos(dot)orszag(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reference on partial data
Date: 2009-04-19 14:04:52
Message-ID: 49EB2F84.3080108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mito wrote:
> 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.
>

No, it's not.

This looks like a usage question, which doesn't belong on -hackers.
Please ask such questions on pgsql-general.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2009-04-19 14:36:43 Re: planner crash/assert hit in 8.4B1
Previous Message Stefan Kaltenbrunner 2009-04-19 13:29:01 planner crash/assert hit in 8.4B1