Re: Referential integrity checking issue
От | Stephan Szabo |
---|---|
Тема | Re: Referential integrity checking issue |
Дата | |
Msg-id | 20011105084607.W40711-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Referential integrity checking issue (Bruno Wolff III <bruno@cerberus.csd.uwm.edu>) |
Список | pgsql-bugs |
On Thu, 1 Nov 2001, Bruno Wolff III wrote: > I am having a problem where I want to delete all of the existing information > in a database and reinitialize it in a transaction. I am reusing the > primary key values and this results in an error with referential > integrity checking. > > I think I have seen something similar to this discussed here previously, but > I am not sure if it was exactly the same problem. I believe so. > Are things supposed to work like this? Not really. What's happening I believe is that it's looking at the final state of the database and seeing that a row in test2 matches. It then also needs to determine if a matching row was re-inserted into test1 which it doesn't currently do. Part of the reason for this was a mistake in reading a piece of the spec that made it appear that such constructs were illegal, so they weren't coded for. I have a test patch that I think fixes the base constraint and the no action referential actions against a 7.2 but it should probably apply okay against 7.1.x. (I think I sent it to the list a while back, if not you can write me).
В списке pgsql-bugs по дате отправления: