Connection Oracle database from Postgres function

From: "Dinesh Pandey" <dpandey(at)secf(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Connection Oracle database from Postgres function
Date: 2005-11-14 11:06:47
Message-ID: 20051114111340.9D5C7F0CF9@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

I want to access Oracle database from Postgres. One way to use DBI-LINK and
use "plperl" function in Postgres to make connection with Oracle. Using that
I am getting the following error.

Environment

Solaris 9 SPARC

PostgreSQL 8.0

DBI-LINK

Perl-5.8.5

-------------------------------------------------------------------

My Function

CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $$

if ($_[0] > $_[1]) { return $_[0]; }

return $_[1];

$$ LANGUAGE plperl;

-------------------------------------------------------------------

On running this above function from sql prompt, I am getting this error, and
connection with database lost

test=# select perl_max(1,2);

server closed the connection unexpectedly

This probably means the server terminated abnormally

before or while processing the request.

The connection to the server was lost. Attempting reset: Failed.

Browse pgsql-general by date

  From Date Subject
Next Message Johnny Ljunggren 2005-11-14 11:29:03 Re: Choosing PostgreSQL as the database for our next project
Previous Message Sergey Karin 2005-11-14 07:03:33 [8.1] "drop table" in plpgsql function

Browse pgsql-sql by date

  From Date Subject
Next Message Lane Van Ingen 2005-11-15 01:17:47 How to Log SELECT Statements Having Errors
Previous Message Christian Paul B. Cosinas 2005-11-14 09:47:12 Re: Problem with "NOT IN (subquery)