projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
| inline |
side by side
(parent:
bccbcbf
)
Convert a perl array to a postgres array when returned by Set Returning Functions...
author
Andrew Dunstan
<
[email protected]
>
Mon, 28 Sep 2009 17:31:12 +0000
(17:31 +0000)
committer
Andrew Dunstan
<
[email protected]
>
Mon, 28 Sep 2009 17:31:12 +0000
(17:31 +0000)
src/pl/plperl/plperl.c
|
blob
|
blame
|
history
diff --git
a/src/pl/plperl/plperl.c
b/src/pl/plperl/plperl.c
index a0293cf801fe5e020337852ead0985908b7baf6f..9762eed523a53c265f965c6d4c076c7ef996d2b3 100644
(file)
--- a/
src/pl/plperl/plperl.c
+++ b/
src/pl/plperl/plperl.c
@@
-2021,7
+2021,15
@@
plperl_return_next(SV *sv)
if (SvOK(sv))
{
- char *val = SvPV(sv, PL_na);
+ char *val;
+
+ if (prodesc->fn_retisarray && SvROK(sv) &&
+ SvTYPE(SvRV(sv)) == SVt_PVAV)
+ {
+ sv = plperl_convert_to_pg_array(sv);
+ }
+
+ val = SvPV(sv, PL_na);
ret = InputFunctionCall(&prodesc->result_in_func, val,
prodesc->result_typioparam, -1);