Re: Inheritance and unique constraints

From: John Purser <jmpurser(at)gmail(dot)com>
To: "Christian Rengstl" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inheritance and unique constraints
Date: 2006-07-05 15:26:11
Message-ID: 20060705082611.626ce348.jmpurser@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 05 Jul 2006 15:51:23 +0200
"Christian Rengstl" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de> wrote:

> Hi everyone,
>
> i hope (and i'm sure) somebody can answer my question: if i have a
> master table and several "child" tables, do the child tables inherit
> the unique constraint(s) defined for the master table or do i have to
> define the same constraints for the same fields in all the child
> tables?
>
> Thanks!
>
> --
> Christian Rengstl M.A.
> Klinik und Poliklinik für Innere Medizin II
> Kardiologie - Forschung
> Universitätsklinikum Regensburg
> B3 1.388
> Franz-Josef-Strauss-Allee 11
> 93053 Regensburg
> Tel.: +49-941-944-7230
>
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 9: In versions below 8.0,
> the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

As of 8.1.0 UNIQUE constraints are not inherited. See page 62 of the
documentation.

John Purser

--
Courage is your greatest present need.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasbinder Bali 2006-07-05 16:11:13 Re: Database connectivity using a unix shell
Previous Message Scott Marlowe 2006-07-05 15:01:54 Re: pgsql vs mysql