odbc with debian woody/postgres - Mailing list pgsql-general

From Matt Price
Subject odbc with debian woody/postgres
Date
Msg-id 20021009062238.GA1733@utoronto.ca
Whole thread Raw
Responses Re: odbc with debian woody/postgres  (Michael Meskes <meskes@postgresql.org>)
List pgsql-general
Hi there,

I'm trying to get odbc to work on my machine.  Here's the setup:
Debian Woody with Postgresql 7.2; unixodbc and odbc-postgresql also
installed.  I followed the directionsi n the 'Debian HOWTO' that comes
with the odbc-postgresql package, so my odbcinit.ini looks like this:

[PostgreSQL]
Description             = PostgreSQL ODBC driver for Linux and Windows
Driver          = /usr/lib/postgresql/lib/libodbcpsql.so
Setup           = /usr/lib/odbc/libodbcpsqlS.so
Debug           = 0
CommLog         = 1
FileUsage               = 1


My odbc.ini currently looks like this (slightly modified from the
original):


[PostgreSQL]
Description         = PostgreSQL template1
Driver              = PostgreSQL
Trace               = No
TraceFile           = /tmp/odbc.log
Database            = template1
Servername          = localhost
UserName            = postgres
Password            = postgres
Port                = 5432
Protocol            = 6.4
ReadOnly            = Yes
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =


and the relevant lines of pg_hba.conf are the following:
local        all                                           trust
host         all         127.0.0.1     255.0.0.0           ident
sameuser
host         all         0.0.0.0       0.0.0.0             reject


With this setup I can't seem to get odbc towork.  I should note that
psql works fine, and that odbc works fine with mysql (I've left the
mysql bits of the odbc*.ini files out) -- in fact, it worked right out
of the box, which was kind of amazing given how hard a time I'm having
with postgresql).  using isql I get the following error:
-------------------
isql Postgresql -v
[unixODBC]FATAL 1:  IDENT authentication failed for user "postgres"

[ISQL]ERROR: Could not SQLConnect
-----------------
I'm doing all this directly from the shell, so I don't understand why
Postgres is using the 'ident' verification method.  Can anyone give me
any pointers?  Again, I've had no problem iwth psql or the mysql/odbc
combination, so I assume something is wrongwith my setup for
postgres.  Thanks,
Matt

ps:  assuming I get thisworking, how do I add other database names to
odbc.ini?  Do I need whole new sections (like
"[Postgresql/dbname]") or can I just add the dbnames to the Database
line of the file?

pgsql-general by date:

Previous
From: Savita
Date:
Subject: Re: How to find out about index
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: How to find out about index