Found in 8.4.2, replicated in HEAD. Steps:

1. Create PL/Perl function.
2. Run it.
3. Create same function with PL/PerlU
4. Run it.
5. Create same function again with PL/Perl
6. Boom.

Example on HEAD built today (ignore the error from the plperl version, that's 
the issue I'm trying to fix locally):

postgres=# create or replace function wtf(text) returns text language plperl as 
'shift';
CREATE FUNCTION
Time: 151.054 ms
postgres=# select wtf('hey');
ERROR:  invalid byte sequence for encoding "UTF8": 0x00
CONTEXT:  PL/Perl function "wtf"
postgres=# create or replace function wtf(text) returns text language plperlu 
as 'shift';
CREATE FUNCTION
Time: 41.255 ms
postgres=# select wtf('hey');
 wtf 
-----
 hey
(1 row)

Time: 0.523 ms
postgres=# create or replace function wtf(text) returns text language plperl as 
'shift';
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.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to