From: | "Matt Wedgwood" <mwedgwood(at)TONYSANCHEZ(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Datatype misrepresentation DTS with SQL Server |
Date: | 2002-02-08 20:02:05 |
Message-ID: | 991E16E7D6C25F4DA9F439DDD2B4FA4F13B618@SANCHEZ.TONYSANCHEZ.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Thanks, Tom. That looks promising, but unfortunately I don't have the
tools to recompile. I guess there's no magic configuration file that
would allow me to override this built-in type-mapping, eh?
Any chance someone else has run into this problem found a workaround
that doesn't involve customizing the code? I'd be satisfied with
something kludgy, as long as it could be reliably automated. <g>
-MW
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, February 08, 2002 1:08 PM
To: Matt Wedgwood
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] Datatype misrepresentation DTS with SQL Server
"Matt Wedgwood" <mwedgwood(at)TONYSANCHEZ(dot)com> writes:
> I'm trying to use the "Import and Export Data" (DTS) tool included
> with MS SQL Server to push data to a PostgreSQL 7.1.3 database via an
> ODBC connection. Everything works great, except if I try to use the
> bigint/int8 data type for columns on the PostgreSQL side. DTS
> incorrectly sees the int8 datatype as "char" and therefore ties to
> shove a space-padded representation of the integer into the table.
You could try hacking the source code of the PG ODBC driver. I note
this in pgtypes.c:
/* Change this to SQL_BIGINT for ODBC v3 bjm 2001-01-23 */
case PG_TYPE_INT8:
return SQL_CHAR;
Don't know whether DTS will actually recognize SQL_BIGINT, but it's
worth a try. SQL_NUMERIC could be worth trying too, if BIGINT fails.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Simeo Reig | 2002-02-08 23:39:28 | Listen / Notify |
Previous Message | Tom Lane | 2002-02-08 19:07:50 | Re: Datatype misrepresentation DTS with SQL Server |