Some errors are not reported thru ODBC driver.

From: Raul Chirea <raul(at)brahms(dot)ro>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Some errors are not reported thru ODBC driver.
Date: 2000-05-17 00:48:49
Message-ID: 3921EC71.C51C3AAF@brahms.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Hi there,

I observed that some errors are not reported by the ODBC driver (Win9x).

My case was:

create table master (id integer not null, primary key (id));
create table detail (id, master_id, primary key (id), foreign key
(master_id) references master (id));

insert into master values (1);
insert into detail values (1, 1);

Now, if you try this (using ODBC):

delete from master where id = 1;

the ODBC driver reports success, but it is obvious that this is not
possible. More than that
in "psql" you will obtain:

ERROR: <unnamed> referential integrity violation - key in master still
referenced from detail

Bye.

Browse pgsql-interfaces by date

  From Date Subject
Next Message SAKAIDA Masaaki 2000-05-17 01:45:40 Re: ECPG failed
Previous Message Peter Mount 2000-05-16 19:21:18 Re: Detecting presence of database through JDBC?