postgresql odbc problem

From: "Chittaranjan Mandal" <Chittaranjan(dot)Mandal(at)cse(dot)iitkgp(dot)dhs(dot)org>
To: pgsql-ODBC(at)postgresql(dot)org
Subject: postgresql odbc problem
Date: 2002-08-23 04:21:30
Message-ID: 20020823042131.19722.qmail@cpusrv-pcs-1.cse.iitkgp.ernet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I am trying to install odbc support (to be availed of from linux m/cs)
to interface to my existing postgresql installation (also on linux).
I have installed a few packages, and got as far as odbctest.
But I do not know what is happening.
How can I have a trace of communications?

Could I please request you to take a look at the trace that I am getting
after running odbctest and tell me what is going on.
$ cat odbc.trace

[00000400]: SQLAllocEnv ( ... )
SQL_SUCCESS

[00000400]: SQLAllocConnect ( ... )
SQL_SUCCESS

[00000400]: SQLDriverConnect ( ... )
SQL_NO_DATA_FOUND

[00000400]: SQLError ( ... )
SQL_NO_DATA_FOUND

[00000400]: SQLError ( ... )
SQL_NO_DATA_FOUND

[00000400]: SQLFreeConnect ( ... )
SQL_SUCCESS
--------------------------------------

Now, there is a database called chitta that I can connect to normally.
[chitta(at)cpusrv-pcs-3 chitta]$ psql -h postmaster chitta
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

chitta=>
--------------------------------------
How can I configure odbc.ini so that I can connect to this database (on
host postmaster)?

My current configuration is as follows:
$ rpm -qa | grep -i "\(postgr\|odbc\)"
postgresql-odbc-7.1.2-19mdk
postgresql-test-7.1.2-19mdk
postgresql-libs-7.1.2-19mdk
postgresql-7.1.2-19mdk
postgresql-devel-7.1.2-19mdk
postgresql-jdbc-7.1.2-19mdk
libiodbc-3.0.6-2
libiodbc-admin-3.0.6-2
postgresql-perl-7.1.2-19mdk
libiodbc-devel-3.0.6-2

----------/etc/odbc.ini-----------
[ODBC Data Sources]
Pgsql = PostgreSQL 7.1

[Pgsql]
Driver = /usr/lib/libpsqlodbc.so.0
Description = PostgreSQL DSN
Host = postmaster
UserName =
Password =
ServerType = PostgreSQL 7.1
Database =
FetchBufferSize = 99
ReadOnly = no
TraceFile = /var/log/odbc.trace
Trace = 1
DebugFile = /var/log/odbc.debug
Debug = 1

[Default]
Driver = /usr/lib/libpsqlodbc.so.0

-----------~/.odbc.ini------------
[ODBC Data Sources]
Pgsql = PostgreSQL 7.1

[Pgsql]
UserName =
Password =
Database = chitta

[Default]
Driver = /usr/lib/libpsqlodbc.so.0
TraceFile = /home/faculty/chitta/tmp/odbc.trace
Trace = 1
DebugFile = /home/faculty/chitta/tmp/odbc.debug
Debug = 1

-------/sda/pgsql/data/pg_hba.conf------
# these two entries are only for debugging, comment out asap
local all trust
host all 10.5.18.0 255.255.255.0 trust

# these are the proper entries - hopefully
local sameuser password pg_passwd
host sameuser 127.0.0.1 255.255.255.255 ident sameuser
host sameuser 10.0.0.0 255.0.0.0 ident sameuser
host all 10.0.0.0 255.0.0.0 ident postmap

Regards,
Chitta

Browse pgsql-odbc by date

  From Date Subject
Next Message Greg Copeland 2002-08-23 12:47:56 Re: [HACKERS] ODBC Driver moved to GBorg ...
Previous Message Marc G. Fournier 2002-08-22 22:46:03 ODBC Driver moved to GBorg ...