Re: Datatype misrepresentation DTS with SQL Server

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Datatype misrepresentation DTS with SQL Server
Дата
Msg-id 25156.1013195270@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Datatype misrepresentation DTS with SQL Server  ("Matt Wedgwood" <mwedgwood@TONYSANCHEZ.com>)
Список pgsql-odbc
"Matt Wedgwood" <mwedgwood@TONYSANCHEZ.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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Matt Wedgwood"
Дата:
Сообщение: Datatype misrepresentation DTS with SQL Server
Следующее
От: "Matt Wedgwood"
Дата:
Сообщение: Re: Datatype misrepresentation DTS with SQL Server