Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XluUH-0004CF-9M for pgsql-odbc@arkaria.postgresql.org; Wed, 05 Nov 2014 06:54:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XluUF-0001b0-Cd for pgsql-odbc@arkaria.postgresql.org; Wed, 05 Nov 2014 06:54:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XluUE-0001au-Jk for pgsql-odbc@postgresql.org; Wed, 05 Nov 2014 06:54:34 +0000 Received: from a0i268.smtpcorp.com ([216.22.15.100]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XluUB-0002lu-24 for pgsql-odbc@postgresql.org; Wed, 05 Nov 2014 06:54:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0_1; h=Feedback-ID:X-Smtpcorp-Track:Date:To:Reply-To:From:Subject:Message-ID; bh=TaSDs1JJIhDae6VLD6zjF36qrhVGq/DIu0RPzzqg6tM=; b=mTdY8dVJED0KEToJjTztl74JXA/hDc1w0k7ZdaHHV2NuewjtD8d+UAKxSA/vLMrGQzobPrSo0BOZ374PFdmRqKhsMkdSP7OlLijXwuUxdp/BabFq97dxRS5/i0eRxNIDbNLYIHFn0fFQIJwbPNnHUdM+fDVjv2zfSWg+pgu9uXw=; Message-ID: <1415170475.4399.7.camel@watchmen.homenetwork> Subject: Re: Does psqlODBC actually work on osx? From: Malcolm MacLeod Reply-To: malcolm.macleod@tshwanedje.com To: "pgsql-odbc@postgresql.org" Date: Wed, 05 Nov 2014 08:54:35 +0200 In-Reply-To: <1415168015.4399.1.camel@watchmen.homenetwork> References: <1415116470.3086.9.camel@watchmen.homenetwork> <5458F843.9010009@aklaver.com> <1415118182.3086.11.camel@watchmen.homenetwork> <54599684.4060809@tpf.co.jp> <1415168015.4399.1.camel@watchmen.homenetwork> Organization: TshwaneDJe HLT Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Smtpcorp-Track: 1b_Il94gfNmz21.WcXkOg-qe Feedback-ID: 50707m:50707aaxqHxb:50707sz5DiWXCO3:SMTPCORP X-Pg-Spam-Score: -1.8 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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 > > > > -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc