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