delete fails due to referential integrity, but return code is 0.

From: Leonid Furman <leonid(dot)furman(at)veritas(dot)com>
To: "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>
Subject: delete fails due to referential integrity, but return code is 0.
Date: 2001-02-23 17:04:28
Message-ID: DB3EDF713892D31191960008C7B11661827C1B@camxch01.cam.veritas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

I am using PostgreSql on Windows NT 4.0 service pack 5.
PostgreSQL version is PostgreSQL 7.0.0 on i686-pc-cygwin, compiled by gcc
egcs-2.91.57.
The client is an ODBC program which connects to the backend using odbc
driver version 6.50.00.00.

When deleting a record from table A referenced in table B: "delete from A
where id = 1001" using SQLExectDirect() the call returns 0 (this is wrong),
while the record is not deleted from table A (this is right)

Executing the same SQL statement from psql returns:

ERROR: <unnamed> referential integrity violation - key in A still
referenced from B.

Thank you,

Leonid Furman.

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-02-23 17:18:15 Date calculation produces wrong output with 7.02
Previous Message Erik Hofman 2001-02-23 13:56:45 non blcoking behaviour