summaryrefslogtreecommitdiffstats
path: root/src/pl/plperl/sql/plperl_lc.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plperl/sql/plperl_lc.sql')
-rw-r--r--src/pl/plperl/sql/plperl_lc.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pl/plperl/sql/plperl_lc.sql b/src/pl/plperl/sql/plperl_lc.sql
new file mode 100644
index 0000000..a4a06e7
--- /dev/null
+++ b/src/pl/plperl/sql/plperl_lc.sql
@@ -0,0 +1,8 @@
+--
+-- 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();