Re: inserting lots of values into a column that has "unique" property - Mailing list pgsql-bugs

From Bruno Wolff III
Subject Re: inserting lots of values into a column that has "unique" property
Date
Msg-id 20040614154903.GB8883@wolff.to
Whole thread Raw
In response to inserting lots of values into a column that has "unique" property  ("Fehmi Noyan ISI" <fnoyan@linuxmail.org>)
List pgsql-bugs
On Mon, Jun 14, 2004 at 01:07:09 +0800,
  Fehmi Noyan ISI <fnoyan@linuxmail.org> wrote:
>
>  I got the error message as expected. Everything is ok.Now, let's create
> another table called "table_2" with an inheritence from "table_1".
>
>  But, when I insert a new value into "table_2" with an "id" value same
> as with one of the values in "table_1"...
>
>  I think, I must get an error message like the message above (when I try
> to insert a new value directly into "table_1" with a same "id" value).
> There are two same "id"s with the value "1" although the "id" column is
> defined as UNIQUE.
>  If I use "PRIMARY KEY" instead of "UNIQUE NOT NULL", the same thing
> happens.Nothing changes!

This is a deficiency in how inherited tables work. This will not be fixed
in the upcoming 7.5 release. If you need this, you may be better off
using views (of joined tables) rather than inherited tables.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: \w doesn't match non-ASCII letters
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1163: cursor "jdbc_curs_1" does not exist