diff options
Diffstat (limited to 'src/pl/plperl/sql/plperl_array.sql')
-rw-r--r-- | src/pl/plperl/sql/plperl_array.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pl/plperl/sql/plperl_array.sql b/src/pl/plperl/sql/plperl_array.sql index bc67c1ad0df..818a48ec200 100644 --- a/src/pl/plperl/sql/plperl_array.sql +++ b/src/pl/plperl/sql/plperl_array.sql @@ -152,6 +152,13 @@ $$ LANGUAGE plperl; select plperl_arrays_inout('{{1}, {2}, {3}}'); +-- check that we can return an array literal +CREATE OR REPLACE FUNCTION plperl_arrays_inout_l(INTEGER[]) returns INTEGER[] AS $$ + return shift.''; # stringify it +$$ LANGUAGE plperl; + +select plperl_arrays_inout_l('{{1}, {2}, {3}}'); + -- make sure setof works create or replace function perl_setof_array(integer[]) returns setof integer[] language plperl as $$ my $arr = shift; |