aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/pgtypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc/pgtypes.c')
-rw-r--r--src/interfaces/odbc/pgtypes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interfaces/odbc/pgtypes.c b/src/interfaces/odbc/pgtypes.c
index 83f9574d2a7..ff640776f8b 100644
--- a/src/interfaces/odbc/pgtypes.c
+++ b/src/interfaces/odbc/pgtypes.c
@@ -697,6 +697,9 @@ pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_
return 16;
/* Character types (and NUMERIC) use the default precision */
+ case PG_TYPE_VARCHAR:
+ case PG_TYPE_BPCHAR:
+ return 2 * pgtype_precision(stmt, type, col, handle_unknown_size_as);
default:
return pgtype_precision(stmt, type, col, handle_unknown_size_as);
}