Postgresql & Oracle Heteregenous services - strange behaviour - Mailing list pgsql-sql

From Marcin Stępnicki
Subject Postgresql & Oracle Heteregenous services - strange behaviour
Date
Msg-id pan.2007.01.17.12.52.25.379331@gmail.com
Whole thread Raw
Responses Re: Postgresql & Oracle Heteregenous services - strange behaviour  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-sql
I'm not sure if it's proper group, if not then please direct me to more
appropriate one (unixodbc?)

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

select "p_nr_pesel" from "zew_patients"@my_postgresql where
"p_patient_id"=19300;

I see this in postgresql logs:

[6210]   DEBUG:  query: select * from "zew_patients"
[6210]   DEBUG:  query:  SELECT "A1"."p_nr_pesel" FROM "zew_patients"
"A1" WHERE ("A1"."p_patient_id" = 19300)

The point is, I don't why oh why the first select is issued (some cache?),
but it slows the query a lot for obvious reasons. When I issue it for the
second time in the same session, I see only the second select (that's how
it should be from my point of view). After reconnecting I see both selects
again :(. 

If it's known issue, I'd be grateful even for simple RTFM and a link :).

Thank you for your time,
Marcin

-- 
| And Do What You Will be the challenge | http://apcoln.linuxpl.org
|    So be it in love that harms none   | http://biznes.linux.pl
|   For this is the only commandment.   | http://www.juanperon.info
`---*  JID: Aragorn_Vime@jabber.org *---' http://www.naszedzieci.org 




pgsql-sql by date:

Previous
From: "Moiz Kothari"
Date:
Subject: Update query by joining multiple tables.
Next
From: Andrew Sullivan
Date:
Subject: Re: Update query by joining multiple tables.