BUG #3251: selection of numeric columns from MS SQL Server return wron values - Mailing list pgsql-bugs

From CarlosCastaneda
Subject BUG #3251: selection of numeric columns from MS SQL Server return wron values
Date
Msg-id 200704241304.l3OD4sSC044226@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3251
Logged by:          CarlosCastaneda
Email address:      kjatwork@gmx.net
PostgreSQL version: 8.2.4
Operating system:   Windows XP
Description:        selection of numeric columns from MS SQL Server return
wron values
Details:

I used to run queries against PostreSQL from MS SQL Server via linked server
over OLEDB Provider ODBC.
The interface used to work up to version 8.2.3. As of lastest update (8.2.4)
selecting data on numeric(12,2) colums always return 0. Converting the
numeric columns to real succeeds.
Example:
select * from OPENQUERY([Postgres], 'select numericcolomn from table')
returns 0.
select * from OPENQUERY([Postgres], 'select numericcolomn::real from table')
returns the correct values.

But I want to insert data into PostgreSQL via MS SQL Server.
insert into select * from OPENQUERY([Postgres], 'select numericcolomn from
table where 1=0')
select * from SQLServertable

Running the statement above only inserts 0 values.

insert into select * from OPENQUERY([Postgres], 'select numericcolomn::real
as numericcolumn from table where 1=0') select * from SQLServertable
doesn't work either.

It seems, as if there has been a major change in pgODBC provider.

The ODBC Provider version is 08.02.03.00

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Next
From: "Simon K"
Date:
Subject: BUG #3250: Different ResultSets btw JDBC Driver and pgAdmin3