Re: Does psqlODBC actually work on osx? - Mailing list pgsql-odbc
From | Malcolm MacLeod |
---|---|
Subject | Re: Does psqlODBC actually work on osx? |
Date | |
Msg-id | 1415170475.4399.7.camel@watchmen.homenetwork Whole thread Raw |
In response to | Re: Does psqlODBC actually work on osx? (Malcolm MacLeod <malcolm.macleod@tshwanedje.com>) |
Responses |
Re: Does psqlODBC actually work on osx?
|
List | pgsql-odbc |
I've tracked this down to the getDSNInfo function inside dlg_specific.c It checks only INI_SERVER and not SPEC_SERVER - while other parts of the code check both, this leads to inconsistent behaviour. If I use e.g. iodbctestw "DSN=test;UID=postgres;PWD=postgres13;SERVERNAME=10.0.0.3" it bypasses the ini reading and works as expected. I attempted a quick patch to make getDSNInfo check both and after doing that it works as expected, personally I think this should be fixed to check for both. Thanks for all the help. - Malcolm MacLeod > > >>> We have a client trying to connect to PostgreSQL server 9.2 from an osx > > >>> client with our software via ODBC, he has asked for instructions to > > >>> assist him setting up. > > >>> > > >>> I have attempted the setup myself using psqlODBC and no matter what I do > > >>> configuration wise, the driver fails to connect (via iodbctestw and > > >>> iodbc administrator) stating that the password is incorrect - I know > > >>> this is not the case because I am using identical configuration to my > > >>> linux machine where it works fine. > > >> What is the exact error message you are getting? > > >> Are you connecting from within the same network as your Linux machine? > > >> Just trying to eliminate the possibility that it is a pg_hba.conf issue. > > > All on same internal network. > > > Server 10.0.0.3, working machine(s) 10.0.0.24, 10.0.0.25 etc. broken > > > machine 10.0.0.26 > > > I've tried also setting the pg_hba.conf to 'trust' and even then it > > > doesn't seem to work. > > > > > > Various config info and traces below. > > > > > > > > > > > > Snippet from configuration (Although I've played with various other > > > options SSLmode etc. here as well) > > > > > > [test] > > > Driver=psqlODBC > > > Server=10.0.0.3 > > > > The driver seems to ignore the above entry. > > Could you please try Servername instead of Server? > Hrm, you are right using ServerName seems to fix the issue, it is a > relief that it is something so simple in the end. Thanks! > > However it is not as clear cut as "Server" being ignored, as mentioned > in the other messages it does actually attempt to connect to the right > server, postmaster on the server even acknowledges the failed connection > attempt. If I turn ssl support on the server off and on in the > connection string than I get a message that the server refuses SSL etc. > etc. > > Further if I check the code "CopyAttributes" checks for both INI_SERVER > (ServerName) and SPEC_SERVER (Server) and fills ci->server in > identically regardless. > So rather than a case of "Server" being ignored it seems instead that it > is not ignored, but that somehow some part of the auth code is doing > something wrong; scanning manually for servername again instead of using > ci->server or similar?; I don't know the driver code well enough to know > where to look but as I've already set everything up for > compiling/testing if someone can point me to some key places this might > happen I'd be happy to test quickly. > > - Malcolm MacLeod > > > >
pgsql-odbc by date: