Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b136cac

Browse files
author
Nikita Glukhov
committed
Change jsonb_stats() return type to void
1 parent 00d4099 commit b136cac

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/backend/utils/adt/jsonb_selfuncs.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,6 @@ jsonb_stats(PG_FUNCTION_ARGS)
10111011
VariableStatData *resdata = (VariableStatData *) PG_GETARG_POINTER(3);
10121012
VariableStatData vardata;
10131013
Node *constexpr;
1014-
bool result;
10151014
bool varonleft;
10161015

10171016
/* should only be called for OpExpr expressions */
@@ -1020,16 +1019,16 @@ jsonb_stats(PG_FUNCTION_ARGS)
10201019
/* Is the expression simple enough? (Var op Const) or similar? */
10211020
if (!get_restriction_variable(root, opexpr->args, varRelid,
10221021
&vardata, &constexpr, &varonleft))
1023-
return false;
1022+
PG_RETURN_VOID();
10241023

10251024
/* XXX Could we also get varonleft=false in useful cases? */
1026-
result = IsA(constexpr, Const) && varonleft &&
1025+
if (IsA(constexpr, Const) && varonleft)
10271026
jsonbStatsVarOpConst(opexpr->opno, resdata, &vardata,
10281027
(Const *) constexpr);
10291028

10301029
ReleaseVariableStats(vardata);
10311030

1032-
return result;
1031+
PG_RETURN_VOID();
10331032
}
10341033

10351034
/*

src/include/catalog/pg_proc.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11739,7 +11739,7 @@
1173911739
proname => 'jsonb_sel', provolatile => 's', prorettype => 'float8',
1174011740
proargtypes => 'internal oid internal int4', prosrc => 'jsonb_sel' },
1174111741
{ oid => '8528', descr => 'jsonb statsistics estimation',
11742-
proname => 'jsonb_stats', provolatile => 's', prorettype => 'bool',
11742+
proname => 'jsonb_stats', provolatile => 's', prorettype => 'void',
1174311743
proargtypes => 'internal internal int4 internal', prosrc => 'jsonb_stats' },
1174411744

1174511745
]

0 commit comments

Comments
 (0)