Unique constraint for inherited tables - Mailing list pgsql-hackers

From Constantin Teodorescu
Subject Unique constraint for inherited tables
Date
Msg-id 38837919.881E79CC@flex.ro
Whole thread Raw
List pgsql-hackers
I am defining a table t1 with a NOT NULL field f1 and UNIQUE field f2.
(it automatically defines t1_f2_key unique index)

I am defining now a new table t2 that inherits t1 table and add some
columns.

The NOT NULL constraint is preserved for f1 field, the UNIQUE for f2 not
(the index t2_f2_key) is not defined.

Wouldn't be normal that the unique constraint to be inherited also in
t2?

Constantin Teodorescu
FLEX Consulting Braila, ROMANIA


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...
Next
From: Peter Eisentraut
Date:
Subject: bugs@postgresql.org?