From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1000738 ] Wrong ODBC state (42P01 or 42P07) is returned on dropping/creating table
Date: Wed, 13 Dec 2006 07:42:42 +0000 (UTC)
Message-ID: <20061213074242.739F0216E23@pgfoundry.org> (raw)
Bugs item #1000738, was opened at 2006-09-21 14:06
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000738&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Dmitriy Ivanov (divanov)
Assigned to: Nobody (None)
Summary: Wrong ODBC state (42P01 or 42P07) is returned on dropping/creating table
Initial Comment:
When DROP TABLE missing_table is executed, the driver returns error state 42P01 instead of 42S02.
When CREATE TABLE existing_table ... is executed, the driver returns error state 42P07 instead of 42S01.
----------------------------------------------------------------------
>Comment By: Dmitriy Ivanov (divanov)
Date: 2006-12-13 10:42
Message:
I see, thanks. Altering pg back-end sources is not my
business :-). The mute point is whether the driver should
follow the ODBC specification or adhere to values of
SQL_STATE chosen by the back-end.
----------------------------------------------------------------------
Comment By: Nobody (None)
Date: 2006-12-13 05:06
Message:
hi,Dmitriy Ivanov
the error state 42p01 is returned from backend. the ODBC is just get the error state from backend, and then show it up to client.
if you want to change this error state, you should check the file src/include/utils/errcodes.h(pg backend sources).
----------------------------------------------------------------------
Comment By: Dmitriy Ivanov (divanov)
Date: 2006-09-21 21:34
Message:
I am sorry for misleading. We are likely to talk about the
same thing: the value of the SQL_DIAG_SQLSTATE attribute of
diag record. For the 3-character subclass codes of SQLSTATE
that are not specified by ISO/IEC 9075, MSDN and PosgreSQL
define different values.
AFAIU, the psqlODBC driver does not provide mapping for
similar exception conditions. So a heterogeneous ODBC
application needs to check SQLSTATE in a back-end specific
manner.
----------------------------------------------------------------------
Comment By: Hiroshi Inoue (hinoue)
Date: 2006-09-21 20:06
Message:
I don't know about the ODBC state.
Recent servers return SQLSTATE and the driver
passes it the clients.
regards,
Hiroshi Inoue
----------------------------------------------------------------------
Comment By: Dmitriy Ivanov (divanov)
Date: 2006-09-21 17:21
Message:
IMHO, the ODBC state is standardized in MSDN. Do you meant
that the PostgreSQL server returns (or should return) the
same codes?
----------------------------------------------------------------------
Comment By: Dmitriy Ivanov (divanov)
Date: 2006-09-21 17:15
Message:
I meant an ODBC state, which can hardly be returned by the
back-end :-)
----------------------------------------------------------------------
Comment By: Hiroshi Inoue (hinoue)
Date: 2006-09-21 16:03
Message:
The driver returns the error code just as it receives from the backends.
regards,
Hiroshi Inoue
----------------------------------------------------------------------
Comment By: Dmitriy Ivanov (divanov)
Date: 2006-09-21 14:15
Message:
I have forgotten to mention that the behavior is with the
ANSI driver 8.02.0100
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000738&group_id=1000125
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: noreply@pgfoundry.org
Subject: Re: [ psqlodbc-Bugs-1000738 ] Wrong ODBC state (42P01 or 42P07) is returned on dropping/creating table
In-Reply-To: <20061213074242.739F0216E23@pgfoundry.org>
References: <20061213074242.739F0216E23@pgfoundry.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox