Thread: Patched odbc_dfw for PG >= 9.2
Heillo, after stumbling across compile errors for odbc_fdw I realised it was still on the 9.1. level. I've patched it, based on the tds_fdw code (so it's still read-only). It does compile, and I think it is generally sane, however I'm _anything but a C hacker_, so whoever feels confident enough please review this, or even add the write capability :) As I've been playing around with tds_fdw before and just wanted to see if I can get around my encoding issues with odbc_fdw, I will not be able to test it for a few days though. It is available at https://github.com/bluthg/odbc_fdw According notes have been added to the Foreign_data_wrappers WIKI page as well (no need for more people to try compiling it ;-). Cheers, -- Gunnar "Nick" Bluth RHCE/SCLA Mobil +49 172 8853339 Email: gunnar.bluth@pro-open.de __________________________________________________________________________ In 1984 mainstream users were choosing VMS over UNIX. Ten years later they are choosing Windows over UNIX. What part of that message aren't you getting? - Tom Payne
Re: Patched odbc_dfw for PG >= 9.2 - compiles & works but has issues with NULL representation in ODBC?!?
From
"Gunnar \"Nick\" Bluth"
Date:
Am 19.04.2014 12:44, schrieb Gunnar "Nick" Bluth: > Heillo, > > after stumbling across compile errors for odbc_fdw I realised it was > still on the 9.1. level. > > I've patched it, based on the tds_fdw code (so it's still read-only). > > It does compile, and I think it is generally sane, however I'm > _anything but a C hacker_, so whoever feels confident enough please > review this, or even add the write capability :) > > As I've been playing around with tds_fdw before and just wanted to see > if I can get around my encoding issues with odbc_fdw, I will not be > able to test it for a few days though. Ok, finally got it tested against the SQL-Server (shiver). It generally works (picks up the DSN from freetds.conf etc.), but when accessing any remote table, I get: ERROR: invalid input syntax for integer: "NULL" Now, I don't want to change my INT columns to varchar and rework the rubbish that's in there... does anybody know how to trick (unix)ODBC into sending proper NULL values instead of a char representation? Any hints appreciated! Regards, -- Gunnar "Nick" Bluth RHCE/SCLA Mobil +49 172 8853339 Email: gunnar.bluth@pro-open.de __________________________________________________________________________ In 1984 mainstream users were choosing VMS over UNIX. Ten years later they are choosing Windows over UNIX. What part of that message aren't you getting? - Tom Payne