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

Commit ad41d08

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about recursion in get_restriction_variable()
1 parent 8aaa285 commit ad41d08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/utils/adt/jsonb_selfuncs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,9 @@ jsonbStatsVarOpConst(Oid opid, VariableStatData *resdata,
996996
*
997997
* This only supports OpExpr expressions, with (Var op Const) shape.
998998
*
999-
* XXX It might be useful to allow recursion, i.e. get_restriction_variable
1000-
* might derive statistics too. I don't think it does that now, right?
999+
* Var really can be a chain of OpExprs with derived statistics
1000+
* (jsonb_column -> 'key1' -> key2'), because get_restriction_variable()
1001+
* already handles this case.
10011002
*/
10021003
Datum
10031004
jsonb_stats(PG_FUNCTION_ARGS)

0 commit comments

Comments
 (0)