Connection Oracle database from Postgres function

Поиск
Список
Период
Сортировка
От Dinesh Pandey
Тема Connection Oracle database from Postgres function
Дата
Msg-id 20051114111340.9D5C7F0CF9@svr2.postgresql.org
обсуждение исходный текст
Список 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.

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Bath, David"
Дата:
Сообщение: selective dump pg_dump: only specific non-tables? with schema name?
Следующее
От: "Lane Van Ingen"
Дата:
Сообщение: How to Log SELECT Statements Having Errors