Skip to content

Commit 4312e66

Browse files
committed
modify sloanOrdering.c file to pass a single row
1 parent b68eb71 commit 4312e66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ordering/sloanOrdering.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ _pgr_sloanordering(PG_FUNCTION_ARGS) {
5858
&result_tuples,
5959
&result_count);
6060

61+
if (result_count == 0) {
62+
result_tuples = (int64_t*)palloc(sizeof(int64_t));
63+
result_tuples[0] = 1;
64+
result_count = 1;
65+
}
66+
6167
funcctx->max_calls = result_count;
6268
funcctx->user_fctx = result_tuples;
6369
if (get_call_result_type(fcinfo, NULL, &tuple_desc)

0 commit comments

Comments
 (0)