pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dinesh Pandey <dpandey@secf.com>
To: pgsql-sql@postgresql.org
To: pgsql-general@postgresql.org
Subject: Connection Oracle database from Postgres function
Date: Mon, 14 Nov 2005 16:36:47 +0530
Message-ID: <20051114111340.9D5C7F0CF9@svr2.postgresql.org> (raw)

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.

Message-ID: <20051114111340.9D5C7F0CF9@svr2.postgresql.org>
Permalink:  ../20051114111340.9D5C7F0CF9@svr2.postgresql.org/
Also on:    postgresql.org/message-id/20051114111340.9D5C7F0CF9@svr2.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dpandey@secf.com, pgsql-general@postgresql.org
  Subject: Re: Connection Oracle database from Postgres function
  In-Reply-To: <20051114111340.9D5C7F0CF9@svr2.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox