Re: Bug #518: SERIAL type value not seen in FOREIGN KEY
От | Stephan Szabo |
---|---|
Тема | Re: Bug #518: SERIAL type value not seen in FOREIGN KEY |
Дата | |
Msg-id | 20011121124806.Q67806-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Bug #518: SERIAL type value not seen in FOREIGN KEY (pgsql-bugs@postgresql.org) |
Список | 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 по дате отправления: