Fix the bug that when the show OID column option is enabled, SQLColumns() returns...
authorHiroshi Inoue <inoue@tpf.co.jp>
Fri, 10 Aug 2012 12:51:15 +0000 (12:51 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Fri, 10 Aug 2012 12:51:15 +0000 (12:51 +0000)
info.c
version.h

diff --git a/info.c b/info.c
index 6862ea352939cd33cc56793f85ca75e3cecf05c1..d22feb06e403072327f57accfdf20e75284c505e 100644 (file)
--- a/info.c
+++ b/info.c
@@ -2379,7 +2379,9 @@ retry_public_schema:
        if (!relisaview &&
            relhasoids &&
            (atoi(ci->show_oid_column) ||
-            strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0))
+            strncmp(table_name, POSTGRES_SYS_PREFIX, strlen(POSTGRES_SYS_PREFIX)) == 0) &&
+           (NULL == escColumnName ||
+            0 == strcmp(escColumnName, OID_NAME)))
        {
            /* For OID fields */
            the_type = PG_TYPE_OID;
index e633a7ffd2b9b918934a077ed26f0bb40fd5f700..b1c8c0ff46bddbae424ee2954b14c7143be3c654 100644 (file)
--- a/version.h
+++ b/version.h
@@ -12,6 +12,6 @@
 #define POSTGRESDRIVERVERSION      "09.01.0101"
 #define POSTGRES_RESOURCE_VERSION  "09.01.0101\0"
 #define PG_DRVFILE_VERSION     9,1,01,01
-#define PG_BUILD_VERSION       "201207120001"
+#define PG_BUILD_VERSION       "201208100001"
 
 #endif