X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7C3D6DB6B4; Mon, 14 Nov 2005 08:13:53 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77928-06; Mon, 14 Nov 2005 12:13:49 +0000 (GMT) X-Greylist: delayed 00:27:17.376128 by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id A9A42DB73E; Mon, 14 Nov 2005 07:40:53 -0400 (AST) Received: from secf.com (209-128-104-244.bayarea.net [209.128.104.244]) by svr2.postgresql.org (Postfix) with ESMTP id 9D5C7F0CF9; Mon, 14 Nov 2005 11:13:40 +0000 (GMT) Received: from dinesh by secf.com (MDaemon.PRO.v8.1.3.R) with ESMTP id md50001895051.msg; Mon, 14 Nov 2005 03:15:03 -0800 From: "Dinesh Pandey" To: , Subject: Connection Oracle database from Postgres function Date: Mon, 14 Nov 2005 16:36:47 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_025A_01C5E939.9EB29AC0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcXpC4FA/+ODXfThQiSckE8VdMjHsg== X-Authenticated-Sender: dpandey@secf.com X-Spam-Processed: mail.secf.com, Mon, 14 Nov 2005 03:15:03 -0800 (not processed: message from valid local sender) X-MDRemoteIP: 220.227.32.11 X-Return-Path: dpandey@secf.com X-MDAV-Processed: mail.secf.com, Mon, 14 Nov 2005 03:15:05 -0800 Message-Id: <20051114111340.9D5C7F0CF9@svr2.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.432 required=5 tests=[AWL=0.430, HTML_MESSAGE=0.001, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.432 X-Spam-Level: X-Archive-Number: 200511/691 X-Sequence-Number: 86835 This is a multi-part message in MIME format. ------=_NextPart_000_025A_01C5E939.9EB29AC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. ------=_NextPart_000_025A_01C5E939.9EB29AC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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=3D# 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.

------=_NextPart_000_025A_01C5E939.9EB29AC0--