From 5732f153a3ca74841a9d4f6802f2a1a067fed9ee Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 28 Sep 2005 08:33:24 +0000 Subject: [PATCH] Map 'name' to SQL_VARCHAR rather than SQL_CHAR - this fixes an error with SQL Server linked servers which gets confused by the mismatch between the column size and the data size. --- pgtypes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pgtypes.c b/pgtypes.c index a361405..112fbbb 100644 --- a/pgtypes.c +++ b/pgtypes.c @@ -246,9 +246,11 @@ pgtype_to_concise_type(StatementClass *stmt, Int4 type, int col) case PG_TYPE_CHAR2: case PG_TYPE_CHAR4: case PG_TYPE_CHAR8: - case PG_TYPE_NAME: return SQL_CHAR; + case PG_TYPE_NAME: + return SQL_VARCHAR; + #ifdef UNICODE_SUPPORT case PG_TYPE_BPCHAR: if (col >= 0 && -- 2.39.5