Skip to content

Commit f70b795

Browse files
committed
Fix the syntax error
1 parent 1a1b146 commit f70b795

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/pg_get_functiondef/pg_get_functiondef_mul.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ Datum pg_get_functiondef_mul(PG_FUNCTION_ARGS)
5050
info = (FunctionInfo)palloc(sizeof(struct FunctionInfoData));
5151
funcctx->user_fctx = info;
5252

53-
/* PostgreSQL support return the result? */
53+
/* If can't return composite type, end the work */
5454
if (get_call_result_type(fcinfo, NULL, &tuple_desc) != TYPEFUNC_COMPOSITE)
5555
{
5656
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("function returning record called in context that cannot accept type record")));
57+
SPI_finish();
58+
SRF_RETURN_DONE(funcctx);
5759
}
5860
info->result_tuple_meta = TupleDescGetAttInMetadata(tuple_desc);
5961
info->result_desc = tuple_desc;

0 commit comments

Comments
 (0)