Re: [PATCH] Support for foreign keys with arrays

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <simon(at)2ndQuadrant(dot)com>,<misa(dot)simic(at)gmail(dot)com>
Cc: <gabriele(dot)bartolini(at)2ndquadrant(dot)it>, <marco(dot)nenciarini(at)2ndquadrant(dot)it>,<pgsql(at)j-davis(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Support for foreign keys with arrays
Date: 2012-06-17 14:58:17
Message-ID: 4FDDAA39020000250004858F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
Misa Simic wrote:

>> IMO, both approaches make sense...
>
> Agreed.

Can someone provide a practical example of a "foreign key with array"
use case? The only situations I'm able to think of right now are the
same cases where you would now use a table with primary keys of two
tables to provide a many-to-many linkage. Does this proposed feature
handle other cases or handle this type of case better?

The "referencing value is contained by the referenced value" has many
obvious uses. For example, in our courts data we have a statute
table which effectively has a statute cite and effective date range
for the primary key, and we have a charge table with a statute cite
and an offense date used to match it to a statute row.

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Misa Simic 2012-06-17 15:14:05 Re: [PATCH] Support for foreign keys with arrays
Previous Message Magnus Hagander 2012-06-17 13:23:38 Re: Backup docs