Hannu Krosing wrote:

[plperl can return data that is not valid in the server encoding and it is not caught]

This results in a table, which has invalid utf sequence in it and
consequently does not pass dump/load

What would be the best place to fix this ?

Should there be checks in all text types ? (probably too expensive)

The plperl code has no type-specific checks, and in any case limiting it to "text" types would defeat third party and contrib types of which it knows nothing (think citext). We should check all strings returned by plperl.
Or should pl/perl check it's return values for compliance with
server_encoding ?

I think the plperl glue code should check returned strings using pg_verifymbstr().

Or should postgresql itself check that pl-s return what they promise to
return ?



There is no central place for it to check. The pl glue code is the right place, I think.

cheers

andrew



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

Reply via email to