inheritance...

From: Tom Allison <tom(at)tacocat(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: inheritance...
Date: 2008-04-28 01:13:12
Message-ID: 481524A8.4090204@tacocat.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ran into something really unexpected, but then I've never tried using
inherited tables.

I have a master table (named master) that has two child tables.

create table master (
id serial,
foo varchar(20),
bar varchar(20),
constraint foobar_master unique (foo,bar)
);

Now when I do this with just a table, the unique constraint works.

But when I have child tables:

create table slave (
status varchar(20),
deleted boolean default false
) inherits (master);

I seem to lose that unique constraint. Which makes for a HUGE problem.

Am I missing something in the fine print?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Allison 2008-04-28 01:23:12 inheritance. more.
Previous Message Steve Martin 2008-04-27 22:30:40 Re: timestamp with time zone output incorrect