aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2010-02-17 05:32:48 +0000
committerAndrew Dunstan <andrew@dunslane.net>2010-02-17 05:32:48 +0000
commit8823bc2e2b12ecf0a597d9d352995d01ac138108 (patch)
tree937b7690e9e49e5618172922eb2c694b1ce5ecf2
parent50a90fac40db82680ac7ceacf3348f3f08f5343e (diff)
downloadpostgresql-8823bc2e2b12ecf0a597d9d352995d01ac138108.tar.gz
postgresql-8823bc2e2b12ecf0a597d9d352995d01ac138108.zip
Use a fatal warning check with what looks like a more portable error message. Error noticed by Tom and buildfarm member kite.
-rw-r--r--src/pl/plperl/expected/plperl.out6
-rw-r--r--src/pl/plperl/sql/plperl.sql4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pl/plperl/expected/plperl.out b/src/pl/plperl/expected/plperl.out
index 0e7c65dc2b0..b3027f89268 100644
--- a/src/pl/plperl/expected/plperl.out
+++ b/src/pl/plperl/expected/plperl.out
@@ -578,7 +578,7 @@ DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
ERROR: Can't use string ("foo") as a SCALAR ref while "strict refs" in use at line 1.
CONTEXT: PL/Perl anonymous code block
-- check that we can "use warnings" (in this case to turn a warn into an error)
--- yields "ERROR: Useless use of length in void context"
-DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
-ERROR: Useless use of length in void context at line 1.
+-- yields "ERROR: Useless use of sort in scalar context."
+DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;
+ERROR: Useless use of sort in scalar context at line 1.
CONTEXT: PL/Perl anonymous code block
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
index 905e9187d40..6d4c5c2a854 100644
--- a/src/pl/plperl/sql/plperl.sql
+++ b/src/pl/plperl/sql/plperl.sql
@@ -379,6 +379,6 @@ DO $$ use blib; $$ LANGUAGE plperl;
DO $do$ use strict; my $name = "foo"; my $ref = $$name; $do$ LANGUAGE plperl;
-- check that we can "use warnings" (in this case to turn a warn into an error)
--- yields "ERROR: Useless use of length in void context"
-DO $do$ use warnings FATAL => qw(void) ; length "abc" ; 1; $do$ LANGUAGE plperl;
+-- yields "ERROR: Useless use of sort in scalar context."
+DO $do$ use warnings FATAL => qw(void) ; my @y; my $x = sort @y; 1; $do$ LANGUAGE plperl;