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

Commit32c97fd

Browse files
committed
Suppress remaining compile warnings, and add a comment about why
it's not really broken. Andrew Dunstan
1 parent35f4994 commit32c97fd

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

‎src/pl/plperl/SPI.xs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,7 @@ spi_spi_exec_query(query, ...)
9494
RETVAL=newRV_noinc((SV*)ret_hash);
9595
OUTPUT:
9696
RETVAL
97+
98+
99+
BOOT:
100+
items=0;/* avoid 'unused variable' warning */

‎src/pl/plperl/plperl.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ENHANCEMENTS, OR MODIFICATIONS.
3434
*
3535
* IDENTIFICATION
36-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.60 2004/11/2121:17:03 tgl Exp $
36+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.61 2004/11/2122:13:37 tgl Exp $
3737
*
3838
**********************************************************************/
3939

@@ -963,9 +963,25 @@ plperl_func_handler(PG_FUNCTION_ARGS)
963963

964964
if (prodesc->fn_retistuple&&fcinfo->resultinfo)/* set of tuples */
965965
{
966+
/*
967+
* This branch will be taken when the function call
968+
* appears in a context that can return a set of tuples,
969+
* even if it only actually returns a single tuple
970+
* (e.g. select a from foo() where foo returns a singleton
971+
* of some composite type with member a). In this case, the
972+
* return value will be a hashref. If a rowset is returned
973+
* it will be an arrayref whose members will be hashrefs.
974+
*
975+
* Care is taken in the code only to refer to the appropriate
976+
* one of ret_hv and ret_av, only one of which is therefore
977+
* valid for any given call.
978+
*
979+
* XXX This code is in dire need of cleanup.
980+
*/
981+
966982
/* SRF support */
967-
HV*ret_hv;
968-
AV*ret_av;
983+
HV*ret_hv=NULL;
984+
AV*ret_av=NULL;
969985
FuncCallContext*funcctx;
970986
intcall_cntr;
971987
intmax_calls;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp