[ psqlodbc-Bugs-1000738 ] Wrong ODBC state (42P01 or 42P07) is returned on dropping/creating table
am 13.12.2006 03:06:05 von noreplyBugs item #1000738, was opened at 2006-09-21 10:06
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10007 38&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: Nobody (None)
Date: 2006-12-13 02: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 17: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 16: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 13: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 13: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 12: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 10: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=10007 38&group_id=1000125
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend