Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C43D69FA380 for ; Wed, 13 Dec 2006 03:42:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 17074-03 for ; Wed, 13 Dec 2006 03:42:49 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id 3BD6B9FA1A1 for ; Wed, 13 Dec 2006 03:42:49 -0400 (AST) Received: from localhost (unknown [200.46.204.191]) by pgfoundry.org (Postfix) with ESMTP id 4C06A216E48; Wed, 13 Dec 2006 07:42:49 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 16868-05; Wed, 13 Dec 2006 03:42:42 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id 739F0216E23; Wed, 13 Dec 2006 07:42:42 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000738 ] Wrong ODBC state (42P01 or 42P07) is returned on dropping/creating table Content-type: text/plain; charset=UTF-8 Message-Id: <20061213074242.739F0216E23@pgfoundry.org> Date: Wed, 13 Dec 2006 07:42:42 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/64 X-Sequence-Number: 8511 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