summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2018-04-04 15:51:36 +0000
committerTom Lane2018-04-04 15:51:36 +0000
commiteac93e20afe434a79e81558c17a7a1408cf9d74a (patch)
treefb9e24e12dfa34b9d52d9daa3f87dc3438c013a4
parent331b2369c0ad1e51d5e50bf5dd75232e0160553a (diff)
Remove less-portable-than-believed test case.
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]
-rw-r--r--contrib/jsonb_plperl/expected/jsonb_plperl.out13
-rw-r--r--contrib/jsonb_plperl/expected/jsonb_plperlu.out13
-rw-r--r--contrib/jsonb_plperl/sql/jsonb_plperl.sql12
-rw-r--r--contrib/jsonb_plperl/sql/jsonb_plperlu.sql12
4 files changed, 2 insertions, 48 deletions
diff --git a/contrib/jsonb_plperl/expected/jsonb_plperl.out b/contrib/jsonb_plperl/expected/jsonb_plperl.out
index 79d53e5e50f..99a2e8e135d 100644
--- a/contrib/jsonb_plperl/expected/jsonb_plperl.out
+++ b/contrib/jsonb_plperl/expected/jsonb_plperl.out
@@ -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
diff --git a/contrib/jsonb_plperl/expected/jsonb_plperlu.out b/contrib/jsonb_plperl/expected/jsonb_plperlu.out
index e842a03396c..8053cf6aa80 100644
--- a/contrib/jsonb_plperl/expected/jsonb_plperlu.out
+++ b/contrib/jsonb_plperl/expected/jsonb_plperlu.out
@@ -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
diff --git a/contrib/jsonb_plperl/sql/jsonb_plperl.sql b/contrib/jsonb_plperl/sql/jsonb_plperl.sql
index 9993132ef0d..8b0a8764afa 100644
--- a/contrib/jsonb_plperl/sql/jsonb_plperl.sql
+++ b/contrib/jsonb_plperl/sql/jsonb_plperl.sql
@@ -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
diff --git a/contrib/jsonb_plperl/sql/jsonb_plperlu.sql b/contrib/jsonb_plperl/sql/jsonb_plperlu.sql
index ab7d2e76e87..9287f7672f7 100644
--- a/contrib/jsonb_plperl/sql/jsonb_plperlu.sql
+++ b/contrib/jsonb_plperl/sql/jsonb_plperlu.sql
@@ -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