| From: | Nick Gorham <nick(at)lurcher(dot)org> | 
|---|---|
| To: | pgsql-odbc(at)postgresql(dot)org | 
| Subject: | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client | 
| Date: | 2015-07-17 14:04:00 | 
| Message-ID: | 55A90B50.6080601@lurcher.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-odbc | 
On 17/07/15 14:02, Stefan Viljoen wrote:
> Hi Nick
>
> Here is my odbc.ini entry for the pgdb-cdr data source:
>
> ---
> [pgdb-cdr]
> Driver                  = /usr/pgsql-9.4/lib/psqlodbc.so
> ServerName              = localhost
> Port                    = 5432
> UserName                = dbuser
> Password                = dbpassword
> Database                = dbname
> ReadOnly                = No
> Protocol                = 9.4
> Trace                   = No
> TraceFile               = sql.log
> ConnSettings       =
> ---
>
> I have tried to
>
> - Replace ServerName with 127.0.0.1 and ::1
> - Changing the protocol to 9.3, 9.2., 9.1
> - Making ReadOnly yes
> - Deliberately mis-spelling the Database name but the error remains the same
>
> - Omitting the password, error remains the same
> - Removing the port, error remains the same.
>
> The only thing I can conclude at this point is that 9.4 Postgres ODBC driver
> is in fact incompatible with the Centos 6.5 ODBC package version?
>
> As far as I can tell isql does not get any response from Postgres ODBC
> driver - given that I can corrupt the pgdb-cdr entry however I like, even
> severe errors or gaps in it is just ignored and the same error is returned
> each time.
>
> I have run strace on isql and I can see that it DOES parse the above file
> though - so I'm reasonable sure that the 9.4 Postgres driver is completely
> incompatible with the ODBC version supplied with Centos 6.5?
>
> Again, THANK YOU for your assistance :)
>
> Kind regards,
Another thing to check is that the driver is reading the same ini file 
as the driver manager.
What error do you get from
isql -v pgdb-cdr dbuser password
It may be the driver (the folks on this list will know better that I do) is reading the ini file itself, so it may be looking elsewhere (instead of using the libodbcinst.so helper lib).
Try setting
export ODBCINI=/path/to/odbc.ini
That may help. also try removing the white space before and after the =
[pgdb-cdr]
Driver=/usr/pgsql-9.4/lib/psqlodbc.so
ServerName=localhost
Port=5432
UserName=dbuser
Password=dbpassword
Database=dbname
ReadOnly= No
Protocol=9.4
Trace=No
TraceFile=sql.log
ConnSettings=
-- 
Nick
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stefan Viljoen | 2015-07-17 14:07:14 | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client | 
| Previous Message | Adrian Klaver | 2015-07-17 13:41:14 | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client |