[unixODBC-support] Oracle's Heteregenous Services via UnixODBC

Marcin Stępnicki mstepnicki at gmail.com
Tue Jan 30 07:27:34 GMT 2007


My issue is only remotely related to UnixODBC, but you seem to be my
only hope. I've described my problem before at psql-sql
(http://www.mail-archive.com/pgsql-sql@postgresql.org/msg23257.html ,
please note the answers) and at Oracle's Metalink (without any
responses), but there it goes again:

I've set up connection from oracle to postgresql via unixodbc and oracle's
heterogeneus services. The connection works, but when I issue the

select "p_nr_pesel" from "ZEW_PATIENTS"@my_postgresql where

I see this in postgresql logs:

[29391]  DEBUG:  query: select * from "zew_patients"
[29391]  DEBUG:  query: select u.usename, c.relname, a.attname,
a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull,
c.relhasrules from pg_user u, pg_class c, pg_attribute a, pg_type t
where u.usesysid = c.relowner and c.oid= a.attrelid and a.atttypid =
t.oid and (a.attnum > 0) and c.relname like 'ZEW_PATIENTS' order by
[29391]  DEBUG:  query:  SELECT "A1"."p_nr_pesel" FROM "ZEW_PATIENTS"
"A1" WHERE ("A1"."p_patient_id" = 19300)

The first query, according to psql-sql thread, is a very bad way to
get the columns' names.
It slows down the whole operation for obvious reasons. When I issue it for the
second time in the same session, I see only the third select (that's how
it should be from my point of view). After reconnecting I see
everything again :(.

I've used postgresql-odbc 08.01.01, 08.01.02 and 07.03.02. I'm pretty
sure (from the sources) that's not strictrly psql-odbc problem but I
thought you may have noticed it while connecting to Oracle.

In case you need it, I've got some logs:
http://www.spsk1.pl/~mstepnicki/odbc/1st.trc (connection+1st query)
http://www.spsk1.pl/~mstepnicki/odbc/2nd.trc (connection+1st+2nd query)

Thank you very much and accept my apologize if it's offtopic.


More information about the unixODBC-support mailing list