Re: Inheritance and unique constraints - Mailing list pgsql-general

From John Purser
Subject Re: Inheritance and unique constraints
Date
Msg-id 20060705082611.626ce348.jmpurser@gmail.com
Whole thread Raw
In response to Inheritance and unique constraints  ("Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de>)
List pgsql-general
On Wed, 05 Jul 2006 15:51:23 +0200
"Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.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.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: pgsql vs mysql
Next
From: "Jasbinder Bali"
Date:
Subject: Re: Database connectivity using a unix shell