The following bug has been logged online: Bug reference: 3030 Logged by: Dr. Axel Reimann Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.8 Operating system: Gentoo Linux, Kernel 2.6.19, glibc 2.5 Description: Unable to query SQL_WCHAR column via ODBC Details:
I created a table via: CREATE TABLE publisher ( name character varying(80) NOT NULL, address text, CONSTRAINT publisher_pkey PRIMARY KEY (name) ) WITHOUT OIDS; ALTER TABLE publisher OWNER TO postgres; whereas the database encoding is set to UTF8 and inserted some data, lets say: 'New Publisher' 'new address' If I query that table, e.g. via pgAdmin's query tool, I can easily retrieve the entered information. Running a corresponding query from an ODBC application, I get the following 'unsupported type' error: [ODBC][11736][SQLExecDirectW.c][138] Entry: Statement = 0x83f2820 SQL = [SELECT Name FROM Publisher][length = 26 (SQL_NTS)] [ODBC][11736][SQLExecDirectW.c][396] Exit:[SQL_SUCCESS] [ODBC][11736][SQLBindCol.c][222] Entry: Statement = 0x83f2820 Column Number = 1 Target Type = -8 SQL_WCHAR Target Value = 0xbfd29a4c Buffer Length = 1024 StrLen Or Ind = 0xbfd29e54 [ODBC][11736][SQLBindCol.c][326] Exit:[SQL_SUCCESS] [ODBC][11736][SQLFetch.c][158] Entry: Statement = 0x83f2820 [ODBC][11736][SQLFetch.c][340] Exit:[SQL_ERROR] DIAG [07006] Received an unsupported type from Postgres The connection was made via ODBC's SQLConnectW function and returned: [ODBC][11609][SQLConnectW.c][159] Entry: Connection = 0x83eac28 Server Name = [LiLiDaB (local PG)][length = 18 (SQL_NTS)] User Name = [postgres][length = 8 (SQL_NTS)] Authentication = [******][length = 6 (SQL_NTS)] UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE' ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings