Re: Bug #518: SERIAL type value not seen in FOREIGN KEY - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: Bug #518: SERIAL type value not seen in FOREIGN KEY
Date
Msg-id 20011121124806.Q67806-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Bug #518: SERIAL type value not seen in FOREIGN KEY  (pgsql-bugs@postgresql.org)
List pgsql-bugs
On Wed, 21 Nov 2001 pgsql-bugs@postgresql.org wrote:

> Edward Grabczewski (edward.grabczewski@btinternet.com) reports a bug with a severity of 1
> The lower the number the more severe it is.
>
> Short Description
> SERIAL type value not seen in  FOREIGN KEY
>
> Long Description
> I have defined a table called arch_object which contains a SERIAL type.
> I have defined another table called mm_object which REFERENCES this
> SERIAL type column.
> I insert a value into table arch_object. This generates the next
> value, which is seen using a SELECT statement.
> I try to insert a value into mm_object based on this new value in
> table arch_object and the INSERT is rejected.
> I cannot see why as this value plainly exists in the arch_object table
> and should be picked up.

Foreign keys and inheritance do not currently play terribly nicely
together.  I think the problem is that you're trying to reference
the row in deposit through arch_object which doesn't work because
the foreign keys are currently explicitly referring to only that
table (do a select * from only arch_object;)

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #518: SERIAL type value not seen in FOREIGN KEY
Next
From: Bruce Momjian
Date:
Subject: Re: Bug #513: union all changes char(3) column definition