Re: using a plpgsql-function and strange behaviour - Mailing list pgsql-general

From Tom Lane
Subject Re: using a plpgsql-function and strange behaviour
Date
Msg-id 22831.980628187@sss.pgh.pa.us
Whole thread Raw
In response to using a plpgsql-function and strange behaviour  (Konstantinos Agouros <elwood@agouros.de>)
List pgsql-general
Konstantinos Agouros <elwood@agouros.de> writes:
> today I tried the following on 7.0.2:

> elwood=# CREATE FUNCTION add_one (int4) RETURNS int4 AS '
> elwood'#     BEGIN
> elwood'#         RETURN $1 + 1;
> elwood'#     END;
> elwood'# ' LANGUAGE 'plpgsql';
> CREATE
> elwood=# select add_one(1);

> The result of this was:
> pqReadData() -- backend closed the channel unexpectedly.

Odd.  It works fine for me on 7.0.2:

play=> select add_one(1);
 add_one
---------
       2
(1 row)

Something broken about your installation, I think, but it's hard
to tell what.  Did anything show up in the postmaster log?  Is there
a corefile you can get a backtrace from?

            regards, tom lane

pgsql-general by date:

Previous
From: Konstantinos Agouros
Date:
Subject: using a plpgsql-function and strange behaviour
Next
From: Frank Joerdens
Date:
Subject: Setting logfile location with pg_ctl and postgres.conf