Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit176c3c8

Browse files
committed
Convert a perl array to a postgres array when returned by Set Returning Functions as well as non SRFs. Backpatch to 8.1 where these facilities were introduced. with a little help from Abhijit Menon-Sen.
1 parent2ad57ee commit176c3c8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/pl/plperl/plperl.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plperl.c - perl as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.151 2009/09/16 06:06:12petere Exp $
4+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.152 2009/09/28 17:31:12adunstan Exp $
55
*
66
**********************************************************************/
77

@@ -2021,7 +2021,15 @@ plperl_return_next(SV *sv)
20212021

20222022
if (SvOK(sv))
20232023
{
2024-
char*val=SvPV(sv,PL_na);
2024+
char*val;
2025+
2026+
if (prodesc->fn_retisarray&&SvROK(sv)&&
2027+
SvTYPE(SvRV(sv))==SVt_PVAV)
2028+
{
2029+
sv=plperl_convert_to_pg_array(sv);
2030+
}
2031+
2032+
val=SvPV(sv,PL_na);
20252033

20262034
ret=InputFunctionCall(&prodesc->result_in_func,val,
20272035
prodesc->result_typioparam,-1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp