Remove less-portable-than-believed test case.
authorTom Lane <[email protected]>
Wed, 4 Apr 2018 15:51:36 +0000 (11:51 -0400)
committerTom Lane <[email protected]>
Wed, 4 Apr 2018 15:51:36 +0000 (11:51 -0400)
In commit 331b2369c I added a test to see what jsonb_plperl would do
with a qr{} result.  Turns out the answer is Perl version dependent.
That fact doesn't bother me particularly, but coping with multiple
result possibilities is way more work than this test seems worth.
So remove it again.

Discussion: https://postgr.es/m/[email protected]

contrib/jsonb_plperl/expected/jsonb_plperl.out
contrib/jsonb_plperl/expected/jsonb_plperlu.out
contrib/jsonb_plperl/sql/jsonb_plperl.sql
contrib/jsonb_plperl/sql/jsonb_plperlu.sql

index 79d53e5e50fb11eff7c612252d32a9cac92c4a8c..99a2e8e135d42c99cac505b2029ecc11aafd921d 100644 (file)
@@ -39,17 +39,6 @@ SELECT testSVToJsonb();
  1
 (1 row)
 
--- unsupported (for now)
-CREATE FUNCTION testRegexpToJsonb() RETURNS jsonb
-LANGUAGE plperl
-TRANSFORM FOR TYPE jsonb
-AS $$
-my $a = qr/foo/;
-return ($a);
-$$;
-SELECT testRegexpToJsonb();
-ERROR:  cannot transform this Perl type to jsonb
-CONTEXT:  PL/Perl function "testregexptojsonb"
 -- this revealed a bug in the original implementation
 CREATE FUNCTION testRegexpResultToJsonb() RETURNS jsonb
 LANGUAGE plperl
@@ -218,4 +207,4 @@ SELECT roundtrip('{"1": {"2": [3, 4, 5]}, "2": 3}');
 
 \set VERBOSITY terse \\ -- suppress cascade details
 DROP EXTENSION plperl CASCADE;
-NOTICE:  drop cascades to 7 other objects
+NOTICE:  drop cascades to 6 other objects
index e842a03396c17af2a05a8cc747739be6ae9b9435..8053cf6aa8044a387cdaf4c3b756925023ace7a3 100644 (file)
@@ -39,17 +39,6 @@ SELECT testSVToJsonb();
  1
 (1 row)
 
--- unsupported (for now)
-CREATE FUNCTION testRegexpToJsonb() RETURNS jsonb
-LANGUAGE plperlu
-TRANSFORM FOR TYPE jsonb
-AS $$
-my $a = qr/foo/;
-return ($a);
-$$;
-SELECT testRegexpToJsonb();
-ERROR:  cannot transform this Perl type to jsonb
-CONTEXT:  PL/Perl function "testregexptojsonb"
 -- this revealed a bug in the original implementation
 CREATE FUNCTION testRegexpResultToJsonb() RETURNS jsonb
 LANGUAGE plperlu
@@ -218,4 +207,4 @@ SELECT roundtrip('{"1": {"2": [3, 4, 5]}, "2": 3}');
 
 \set VERBOSITY terse \\ -- suppress cascade details
 DROP EXTENSION plperlu CASCADE;
-NOTICE:  drop cascades to 7 other objects
+NOTICE:  drop cascades to 6 other objects
index 9993132ef0d0a75e5a1e0248cef0aa3bc710a741..8b0a8764afa91d4f587e639407f3647410f5c871 100644 (file)
@@ -34,18 +34,6 @@ $$;
 SELECT testSVToJsonb();
 
 
--- unsupported (for now)
-CREATE FUNCTION testRegexpToJsonb() RETURNS jsonb
-LANGUAGE plperl
-TRANSFORM FOR TYPE jsonb
-AS $$
-my $a = qr/foo/;
-return ($a);
-$$;
-
-SELECT testRegexpToJsonb();
-
-
 -- this revealed a bug in the original implementation
 CREATE FUNCTION testRegexpResultToJsonb() RETURNS jsonb
 LANGUAGE plperl
index ab7d2e76e87db6d5d4ac86ce8bebbf0aa381fd57..9287f7672f76ff95ef3527d55c54a25d3cd6a7d2 100644 (file)
@@ -34,18 +34,6 @@ $$;
 SELECT testSVToJsonb();
 
 
--- unsupported (for now)
-CREATE FUNCTION testRegexpToJsonb() RETURNS jsonb
-LANGUAGE plperlu
-TRANSFORM FOR TYPE jsonb
-AS $$
-my $a = qr/foo/;
-return ($a);
-$$;
-
-SELECT testRegexpToJsonb();
-
-
 -- this revealed a bug in the original implementation
 CREATE FUNCTION testRegexpResultToJsonb() RETURNS jsonb
 LANGUAGE plperlu