summaryrefslogtreecommitdiff
path: root/contrib/bool_plperl/sql/bool_plperl.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-01-25 13:03:11 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-01-25 13:03:11 -0500
commita26194f22bf06733f8065d637f790ee4d4778321 (patch)
treef66c93a080679d6e7010c1e5a58e95a9c747bfd1 /contrib/bool_plperl/sql/bool_plperl.sql
parent652f7818bf978b7230e4462535aef0c9d216b99f (diff)
Fix broken ruleutils support for function TRANSFORM clauses.
I chanced to notice that this dumped core due to a faulty Assert. To add insult to injury, the output has been misformatted since v11. Obviously we need some regression testing here. Discussion: https://postgr.es/m/d1cc628c-3953-4209-957b-29427acc38c8@www.fastmail.com
Diffstat (limited to 'contrib/bool_plperl/sql/bool_plperl.sql')
-rw-r--r--contrib/bool_plperl/sql/bool_plperl.sql6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/bool_plperl/sql/bool_plperl.sql b/contrib/bool_plperl/sql/bool_plperl.sql
index dd99f545ea9..b7f570862ce 100644
--- a/contrib/bool_plperl/sql/bool_plperl.sql
+++ b/contrib/bool_plperl/sql/bool_plperl.sql
@@ -33,7 +33,7 @@ SELECT perl2undef() IS NULL AS p;
CREATE FUNCTION bool2perl(bool, bool, bool) RETURNS void
LANGUAGE plperl
-TRANSFORM FOR TYPE bool
+TRANSFORM FOR TYPE bool, for type boolean -- duplicate to test ruleutils
AS $$
my ($x, $y, $z) = @_;
@@ -46,6 +46,10 @@ $$;
SELECT bool2perl (true, false, NULL);
+--- test ruleutils
+
+\sf bool2perl
+
--- test selecting bool through SPI
CREATE FUNCTION spi_test() RETURNS void