Skip site navigation (1) Skip section navigation (2)

Get error message details

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Get error message details
Date: 2005-10-03 18:44:50
Message-ID: dhru7p$tc7$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-odbc
In PgAdmin running code

create table t1 ( c1 serial primary key );
create table t2 ( c1 integer references t1);
insert into t1 values(1);
insert into t2 values (1);
delete from t1;

causes nice detailed error message

ERROR:  update or delete on "t1" violates foreign key constraint 
"t2_c1_fkey" on "t2"
DETAIL:  Key (c1)=(1) is still referenced from table "t2".

Runnign this code through ODBC I got only ERROR: line

How to retrieve the DETAIL: line using ODBC ?

Andrus. 



pgsql-odbc by date

Next:From: Chris IngramDate: 2005-10-03 22:04:17
Subject: Re: PATCH: Integrity constraint violation should set SQLSTATE to 23000
Previous:From: Zlatko MatićDate: 2005-10-02 23:14:57
Subject: Unbound text box, Text > 255 characters, MSAccess/PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group