blob: 4f8c08f1c94f603a7339db747542bd1d1e4d272f (
plain)
1
2
3
4
5
6
7
8
9
10
|
--
-- Make sure strings are validated
-- Should fail for all encodings, as nul bytes are never permitted.
--
CREATE OR REPLACE FUNCTION perl_zerob() RETURNS TEXT AS $$
return "abcd\0efg";
$$ LANGUAGE plperl;
SELECT perl_zerob();
ERROR: invalid byte sequence for encoding "UTF8": 0x00
CONTEXT: PL/Perl function "perl_zerob"
|