summaryrefslogtreecommitdiff
path: root/src/pl/plperl/sql/plperlu.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plperl/sql/plperlu.sql')
-rw-r--r--src/pl/plperl/sql/plperlu.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pl/plperl/sql/plperlu.sql b/src/pl/plperl/sql/plperlu.sql
new file mode 100644
index 0000000000..978bb4bc15
--- /dev/null
+++ b/src/pl/plperl/sql/plperlu.sql
@@ -0,0 +1,10 @@
+-- Use ONLY plperlu tests here. For plperl/plerlu combined tests
+-- see plperl_plperlu.sql
+
+--
+-- Test compilation of unicode regex - regardless of locale.
+-- This code fails in plain plperl in a non-UTF8 database.
+--
+CREATE OR REPLACE FUNCTION perl_unicode_regex(text) RETURNS INTEGER AS $$
+ return ($_[0] =~ /\x{263A}|happy/i) ? 1 : 0; # unicode smiley
+$$ LANGUAGE plperlu;