Index: src/interfaces/odbc/connection.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/odbc/connection.c,v retrieving revision 1.66 diff -c -r1.66 connection.c *** src/interfaces/odbc/connection.c 2002/06/12 02:27:44 1.66 --- src/interfaces/odbc/connection.c 2002/06/21 09:42:14 *************** *** 958,968 **** * rules. Therefore, these functions call the corresponding local * function instead. */ CC_send_settings(self); CC_lookup_lo(self); /* a hack to get the oid of our large object oid type */ - CC_lookup_pg_version(self); /* Get PostgreSQL version for - SQLGetInfo use */ /* * Multibyte handling is available ? --- 958,974 ---- * rules. Therefore, these functions call the corresponding local * function instead. */ + + /* + * Get the version number first so we can check it before sending options + * that are now obsolete. DJP 21/06/2002 + */ + + CC_lookup_pg_version(self); /* Get PostgreSQL version for + SQLGetInfo use */ CC_send_settings(self); CC_lookup_lo(self); /* a hack to get the oid of our large object oid type */ /* * Multibyte handling is available ? *************** *** 1802,1816 **** } ! /* KSQO */ ! if (ci->drivers.ksqo) { ! result = PGAPI_ExecDirect(hstmt, "set ksqo to 'ON'", SQL_NTS); ! if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) ! status = FALSE; ! ! mylog("%s: result %d, status %d from set ksqo\n", func, result, status); ! } /* Global settings */ --- 1808,1825 ---- } ! /* KSQO (not applicable to 7.3+ - DJP 21/06/2002) */ ! if (PG_VERSION_LT(self, 7.3)) { ! if (ci->drivers.ksqo) ! { ! result = PGAPI_ExecDirect(hstmt, "set ksqo to 'ON'", SQL_NTS); ! if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) ! status = FALSE; ! ! mylog("%s: result %d, status %d from set ksqo\n", func, result, status); ! ! } } /* Global settings */