Re: unique across two tables

From: Misa Simic <misa(dot)simic(at)gmail(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: Tarlika Elisabeth Schmitz <postgresql4(at)numerixtechnology(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: unique across two tables
Date: 2011-06-22 13:55:05
Message-ID: BANLkTimUpsyv5F=F4GdsOJW6+9t3Jd4=7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

true :(

My applogize to all - my BIG fault - i haven't tested that before sent
suggestion

Kind Regards,

Misa

2011/6/22 David Johnston <polobo(at)yahoo(dot)com>

> Misa,****
>
> ** **
>
> Your statement is utterly false simply by virtue of the documentation.****
>
> ** **
>
> Inserts never propagate to other tables in a hierarchy****
>
> Indexes/Constraints only apply to individual tables****
>
> ** **
>
> Since inserts do not propagate the base table never sees the records and
> thus the index on the base table cannot enforce uniqueness.****
>
> ** **
>
> Other caveats and restrictions to the current inheritance implementation
> can be found in section 5.8 (Inheritance) of the documentation. It is in
> the “Data Definition” chapter.****
>
> ** **
>
> David J.****
>
> ** **
>
> ** **
>
> *From:* pgsql-general-owner(at)postgresql(dot)org [mailto:
> pgsql-general-owner(at)postgresql(dot)org] *On Behalf Of *Misa Simic
> *Sent:* Wednesday, June 22, 2011 8:49 AM
> *To:* Tarlika Elisabeth Schmitz
> *Cc:* pgsql-general(at)postgresql(dot)org
> *Subject:* Re: [GENERAL] unique across two tables****
>
> ** **
>
> Hi Tarlika,****
>
> ** **
>
> I think easy solution could be:****
>
> ** **
>
> create baseTable with just one column as PK****
>
> ** **
>
> TableA inhertis baseTable, it will have inherited Column + additianl tables
> for TableA****
>
> TableB inherits baseTable, it will aslo have inherited Column + additianl
> tables for TableB****
>
> ** **
>
> Insert in any table TableA or TableB will automatically insert row in
> baseTable what will fail if value already exist...****
>
> ** **
>
> ** **
>
> ** **
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-06-22 14:02:28 Re: CRUD plpgsql generator
Previous Message David Johnston 2011-06-22 13:34:58 Re: unique across two tables