The following bug has been logged online:
Bug reference: 4327
Logged by: Sam Wong
Email address: sam(at)hellosam(dot)net
PostgreSQL version: 8.3.1
Operating system: Linux Debian
Description: Primary key not refresh after cascaded deleted
Say, I have two table A and B.
That A has one column:
PRIMARY KEY (A_primary_col)
That B has two columns:
PRIMARY KEY (b_primary_col)
FOREIGN KEY (A_reference) REFERENCES A(A_primary_col) ON DELETE CASCADE
Now I inserted the following records into
Now I delete all records from A:
DELETE FROM A;
so that both table is empty now.
Now when I try to insert the following:
Then when I try to insert the following into B:
it will insert with no problem
it will say
duplicate key value violates unique constraint "B_primary_column_pkey".
Analyze the table B.
I believe that's a bug that the primary key index is not updated
pgsql-bugs by date
|Next:||From: andrew victoria||Date: 2008-07-28 06:27:28|
|Subject: BUG #4328: help in creating database encoded with LATIN1|
|Previous:||From: Tom Lane||Date: 2008-07-26 17:30:43|
|Subject: Re: BUG #4324: Default value for a column is not returned in select when column has not been explicitly set |