Re: ODBC Driver int8 Patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ODBC Driver int8 Patch
Date: 2001-01-16 16:50:28
Message-ID: 200101161650.LAA25927@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As I remember, the problem is that this makes us match the ODBC v2 spec,
but then we would not match the v3 spec. Is that correct?

[ Charset ISO-8859-1 unsupported, converting... ]
> Hi,
>
> It was suggested that I post this patch here as no notice was taken of it
> when posted to interfaces!
>
> This fixes problems with int8 columns which are reported by the driver as
> SQL_BIGINT rather than SQL_CHAR as per the ODBC v2 spec. Specifically, I
> have had problems with MS ADO - any queries that contain an int8 column in
> the resultset will *always* return an empty recordset.
>
> Regards,
>
> Dave.
>
> *** pgtypes.c.orig Fri Dec 22 09:12:22 2000
> --- pgtypes.c Fri Dec 22 09:12:22 2000
> ***************
> *** 217,223 ****
> case PG_TYPE_XID:
> case PG_TYPE_INT4: return SQL_INTEGER;
>
> ! case PG_TYPE_INT8: return SQL_BIGINT;
> case PG_TYPE_NUMERIC: return SQL_NUMERIC;
>
> case PG_TYPE_FLOAT4: return SQL_REAL;
> --- 217,223 ----
> case PG_TYPE_XID:
> case PG_TYPE_INT4: return SQL_INTEGER;
>
> ! case PG_TYPE_INT8: return SQL_CHAR;
> case PG_TYPE_NUMERIC: return SQL_NUMERIC;
>
> case PG_TYPE_FLOAT4: return SQL_REAL;
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2001-01-16 17:07:36 RE: ODBC Driver int8 Patch
Previous Message Peter Eisentraut 2001-01-16 16:42:06 Re: RPMS for 7.1beta3 being uploaded.