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

Re: Troubles with PL/Perl in PgSQL

From: "Jeff Eckermann" <jeff_eckermann(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Troubles with PL/Perl in PgSQL
Date: 2005-07-27 23:53:49
Message-ID: dc96qi$ebi$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-novice
"Vladimir D Belousov" <pg-maillist(at)klarnet(dot)ru> wrote in message 
news:42E79EC3(dot)6040407(at)klarnet(dot)ru(dot)(dot)(dot)
> Hallo!
>
> I'm new in PgSQL and I try to migrate from InterBase (Firebird) to PgSQL.
>
> I have a trouble with call ANY plperl function.
> I have the very simple function:
> ---------------------
>
> CREATE FUNCTION myint(integer) RETURNS integer AS $$
>  my $result = $_[0];
>  return $result;
> $$ LANGUAGE plperl;
> ---------------------
>
> And when I try to call this function, I got the error:
> ---------------------
> $ psql test
> Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>     \h for help with SQL commands
>     \? for help with psql commands
>     \g or terminate with semicolon to execute query
>     \q to quit
>
> test=# select * from myint(5);

This syntax is appropriate for set-returning functions.  For functions 
returning a single value, use "select myint(5);"

> 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.
> !>
> ---------------------
> From the /var/log/messages
> Jul 27 18:17:24 ibserver postgres[57180]: [5-1] FATAL:  the database 
> system is in recovery mode
>
> I use FreeBSD 5.4 with PostgreSQL 8.0.3.
> PgSQL was builded from sources with --with-perl option. Other options have 
> defaults values.
>
> Thanks for any replies!
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org
> 



In response to

Responses

pgsql-novice by date

Next:From: Vladimir D BelousovDate: 2005-07-28 01:01:55
Subject: Re: Troubles with PL/Perl in PgSQL
Previous:From: Morgan KitaDate: 2005-07-27 21:16:37
Subject: array values and pl/perl(poss. repost)

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