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

Commit f6839df

Browse files
author
Nikita Glukhov
committed
Fix unsupported case Const @> Var
1 parent a9c6bc8 commit f6839df

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/backend/utils/adt/jsonb_selfuncs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,14 +1397,12 @@ jsonb_sel(PG_FUNCTION_ARGS)
13971397
break;
13981398

13991399
case JsonbContainsOperator:
1400-
{
1401-
if (cnst->consttype != JSONBOID)
1400+
if (!varonleft || cnst->consttype != JSONBOID)
14021401
goto out;
14031402

14041403
sel = jsonSelectivityContains(&stats,
14051404
DatumGetJsonbP(cnst->constvalue));
14061405
break;
1407-
}
14081406
}
14091407

14101408
out:

0 commit comments

Comments
 (0)