From: | Pujol Mathieu <mathieu(dot)pujol(at)realfusio(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Re: How to implement a uniqueness constraint across multiple tables? |
Date: | 2014-08-01 07:47:45 |
Message-ID: | 53DB4621.7080800@realfusio.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Le 01/08/2014 09:28, David G Johnston a écrit :
> Pujol Mathieu wrote
>> Le 31/07/2014 20:38, Kynn Jones a écrit :
>>> I want to implement something akin to OO inheritance among DB tables.
>>> The idea is to define some "superclass" table, e.g.:
>>>
>>> (BTW, one could use PostgreSQL built-in support for table inheritance
>>> to implement something very much like the scheme above.
>>> Unfortunately, as explained in the documentation, there's no built-in
>>> support yet for enforcing uniqueness across multiple subclass tables.)
>>>
>>>
>> Maybe you can use inheritance.
>>
>> So the foreign key constraint will be on the sub_template avoiding two
>> row of sub_x to reference the same foreign key.
>> This is just an idea I let you check for syntax.
>> http://www.postgresql.org/docs/9.3/static/ddl-inherit.html
>> Regards,
>> Mathieu
> You should read Section 5.8.1 (Caveats) of the page your referenced. Or the
> "BTW" in the OP which reiterates the salient points.
>
> David J.
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-implement-a-uniqueness-constraint-across-multiple-tables-tp5813448p5813503.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
You are right, I didn't saw that.
So ignore my previous message. Or maybe for future release like the
documentation says.
Mathieu
--
Mathieu PUJOL
Ingénieur Réalité Virtuelle
REAL FUSIO - 3D Computer Graphics
10, rue des arts - 31000 TOULOUSE - FRANCE
mathieu(dot)pujol(at)realfusio(dot)com - http://www.realfusio.com
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-08-01 07:47:56 | Re: User-defined operator function: what parameter type to use for uncast character string? |
Previous Message | Manuel Kniep | 2014-08-01 07:39:37 | PG_RETURN_UINT16 |