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

Commitecacbdb

Browse files
committed
Return NULL from json_object_agg if it gets no rows.
This makes it consistent with the docs and with all other builtinaggregates apart from count().
1 parentb0d81ad commitecacbdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ json_object_agg_finalfn(PG_FUNCTION_ARGS)
19481948
state=PG_ARGISNULL(0) ?NULL : (StringInfo)PG_GETARG_POINTER(0);
19491949

19501950
if (state==NULL)
1951-
PG_RETURN_TEXT_P(cstring_to_text("{}"));
1951+
PG_RETURN_NULL();
19521952

19531953
appendStringInfoString(state," }");
19541954

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp