From d7f3df874e89906f0267421d1de4a64fb7c05ee1 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Mon, 14 Mar 2011 21:49:52 +0000 Subject: [PATCH] Fix the bug that Access autonumber fields are not detected in 9.0.0200 reported by Arnaud Lesauvage. --- info.c | 4 ++-- version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/info.c b/info.c index 1803ffe..505965b 100644 --- a/info.c +++ b/info.c @@ -2435,7 +2435,7 @@ mylog(" and the data=%s\n", attdef); case PG_TYPE_INT4: case PG_TYPE_INT8: if (attdef && strnicmp(attdef, "nextval(", 8) == 0 && - not_null[0] == '1') + not_null[0] != '0') { auto_unique = SQL_TRUE; if (CC_fake_mss(conn)) @@ -2593,7 +2593,7 @@ mylog(" and the data=%s\n", attdef); set_tuplefield_int2(&tuple[COLUMNS_DATA_TYPE], sqltype); set_nullfield_int2(&tuple[COLUMNS_RADIX], pgtype_radix(conn, field_type)); - set_tuplefield_int2(&tuple[COLUMNS_NULLABLE], (Int2) (not_null[0] == '1' ? SQL_NO_NULLS : pgtype_nullable(conn, field_type))); + set_tuplefield_int2(&tuple[COLUMNS_NULLABLE], (Int2) (not_null[0] != '0' ? SQL_NO_NULLS : pgtype_nullable(conn, field_type))); set_tuplefield_string(&tuple[COLUMNS_REMARKS], NULL_STRING); #if (ODBCVER >= 0x0300) if (attdef && strlen(attdef) > INFO_VARCHAR_SIZE) diff --git a/version.h b/version.h index 08c1fc1..131a005 100644 --- a/version.h +++ b/version.h @@ -12,6 +12,6 @@ #define POSTGRESDRIVERVERSION "09.00.0202" #define POSTGRES_RESOURCE_VERSION "09.00.0202\0" #define PG_DRVFILE_VERSION 9,0,02,02 -#define PG_BUILD_VERSION "201012090001" +#define PG_BUILD_VERSION "201103150001" #endif -- 2.39.5