Treat SQL_BIT as BOOL.
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Fri, 11 Nov 2016 11:51:42 +0000 (20:51 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 13 Nov 2016 11:51:43 +0000 (20:51 +0900)
convert.c
pgtypes.c

index 79010e8bc4223fe994a60349537581d15b5f8f37..fef6abf52bedf3a222335fa1decc18291ab0fb39 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -4521,6 +4521,7 @@ mylog("cvt_null_date_string=%d pgtype=%d buf=%p\n", conn->connInfo.cvt_null_date
        case SQL_WVARCHAR:
        case SQL_WLONGVARCHAR:
 #endif /* UNICODE_SUPPORT */
+       case SQL_BIT:
 
            /* Special handling for some column types */
            switch (param_pgtype)
index d15b09724ea33e0865f7e122b638ba1e26fb1e3d..ccd847553a51815a300ed9af6ddccaf437bd5d34 100644 (file)
--- a/pgtypes.c
+++ b/pgtypes.c
@@ -1273,10 +1273,6 @@ sqltype_to_bind_pgtype(const ConnectionClass *conn, SQLSMALLINT fSqlType)
            pgType = 0;
            break;
 
-       case SQL_BIT:
-           pgType = ci->drivers.bools_as_char ? PG_TYPE_CHAR : PG_TYPE_BOOL;
-           break;
-
        case SQL_TYPE_DATE:
        case SQL_DATE:
            pgType = PG_TYPE_DATE;
@@ -1382,7 +1378,7 @@ sqltype_to_pgtype(const ConnectionClass *conn, SQLSMALLINT fSqlType)
 #endif /* UNICODE_SUPPORT */
 
        case SQL_BIT:
-           pgType = ci->drivers.bools_as_char ? PG_TYPE_CHAR : PG_TYPE_BOOL;
+           pgType = PG_TYPE_BOOL;
            break;
 
        case SQL_TYPE_DATE: