Skip site navigation (1) Skip section navigation (2)

Bug? Problem with accesing Oracle from plperlu function?==?UTF-8?Q? when using remote pg client.

From: Tomasz Olszak <tolszak(at)o2(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug? Problem with accesing Oracle from plperlu function?==?UTF-8?Q? when using remote pg client.
Date: 2009-03-14 13:13:05
Message-ID: 687c1a4f.fc99740.49bbad61.f0977@o2.pl (view raw or flat)
Thread:
Lists: pgsql-bugs
Greetings to All!
 I've tried to find solution of my problem on other pg mailing lists but without bigger effect.
 
I have a table A in PG. There is also table A in Oracle.
 I want to import specific row from oracle to pg, so i create plperlu function
 
CREATE OR REPLACE FUNCTION import.ora_a_row(a_id numeric)
 RETURNS dok_za AS
 $BODY$
 
In IPL:
 create_connection;
 select all columns on oracle from table a where id = a_id;
 returning tuple;
 
$BODY$
 LANGUAGE 'plperlu' VOLATILE;
 
then i can use such function in pl/pgsql;
 ....
 DECLARE:
 var A%ROWTYPE;
 BEGIN;
 ...
 select * into var from import.ora_a_row(100);
 END;...
 
Like you see it very, very convenient.
 
And it works, but only when i make "select * from import.ora_a_row(100);" from psql  on postgresql server(local client).
 When i try to make that select in pgadmin or from remote client I have tns error:
 
TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach) at line 20
 
I've tried with different pg servers and different perls, and differen DBI Oracle packages, so i think pg or perl versions are not causes(Of course environment variables are propably set etc.).
 
When I used PGADMIN 1.6 on postgresql server and left host editline blank(specifying only a pgport) it worked too.
 But when I've written localhost as host it didn't work.
 
Anybody ancounter this kind of problem or maybe it's a bug in plperlu?
 
I'll be grateful for any of Your help.
 
Regards
 
Tomasz

pgsql-bugs by date

Next:From: tusharDate: 2009-03-14 13:45:20
Subject: Re: BUG #4704: syntax error at or near "RETURNING"
Previous:From: Brad ConstantinescuDate: 2009-03-14 12:47:48
Subject: BUG #4704: syntax error at or near "RETURNING"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group