Problem with unixODBC and PostgreSQL - Mailing list pgsql-general

From Julie Reier
Subject Problem with unixODBC and PostgreSQL
Date
Msg-id F81319CA-E3AA-4747-AD3F-3D7483DD3C69@videologygroup.com
Whole thread Raw
Responses Re: Problem with unixODBC and PostgreSQL
List pgsql-general
Hi. I am hoping that someone can advise me on an issue I am having with connecting to a postgresql DB via unixODBC.

I am using an ubuntu VM to test the configuration. Here’s what I did:
  1. Installed unixODBC
  2. Installed odbc-postgresql
  3. Configured odbc drivers and data sources.
I am able to connect to the database via the psql command. However, osql is failing. Here’s the output:

rnduser@rnduser-VirtualBox:~$ osql -S rndredshift6 -U readonly -P *******
checking shared odbc libraries linked to isql for default directories...
strings: '': No such filetrying /tmp/sql ... notrying /tmp/sql ... notrying /etc ... OK
checking odbc.ini filesreading /home/rnduser/.odbc.ini
[rndredshift6] found in /home/rnduser/.odbc.ini
found this section:[rndredshift6]Driver		= PostgreSQLDescription		= data source for rndredshiftServer		= 10.191.4.97Port		= 5439Database		= prod
looking for driver for DSN [rndredshift6] in /home/rnduser/.odbc.ini found driver line: "	Driver		= PostgreSQL" driver "PostgreSQL" found for [rndredshift6] in .odbc.ini
found driver named "PostgreSQL"
"PostgreSQL" is not an executable file
looking for entry named [PostgreSQL] in /etc/odbcinst.ini found driver line: "	Driver		= /usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so" found driver /usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so for [PostgreSQL] in odbcinst.ini
/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so is an executable file
"Server" found, not using freetds.conf
Server is "10.191.4.97"
looking up hostname for ip address 10.191.4.97
osql: warning: no DNS hostname found for "10.191.4.97"
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]           [-R number] [-m flag] hostname [server]      -a is equivalent to -v -t ANY      -c specifies query class for non-IN data      -C compares SOA records on authoritative nameservers      -d is equivalent to -v      -l lists all hosts in a domain, using AXFR      -i IP6.INT reverse lookups      -N changes the number of dots allowed before root lookup is done      -r disables recursive processing      -R specifies number of retries for UDP packets      -s a SERVFAIL response should stop query      -t specifies the query type      -T enables TCP/IP mode      -v enables verbose output      -w specifies to wait forever for a reply      -W specifies how long to wait for a reply      -4 use IPv4 query transport only      -6 use IPv6 query transport only      -m set memory debugging flag (trace|record|usage)
osql: no IP address found for ""
rnduser@rnduser-VirtualBox:~$ 
Telnet to 10.191.4.97 on port 5439 works.
Any ideas of what’s going on here?
Thanks,
Julie
This email is intended only for the use of the individual(s) to whom it is addressed. If you have received this communication in error, please immediately notify the sender and delete the original email.

pgsql-general by date:

Previous
From: Paul Jungwirth
Date:
Subject: Re: how to duplicate data for few times by SQL command in PG
Next
From: Andrey Lizenko
Date:
Subject: Re: temporary tables are logged somehow?