You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
151983: sqlsmith: add support for DO block r=ZhouXing19 a=ZhouXing19
informs #106368
A `DO` block can be either a top-level sql statement or be part of the plpgsql function body. In this commit we introduce the DO block for both of these 2 usages. We also introduced `DisableDoBlocks` which disables both usages of a DO block.
Release note: None
154783: sql/jsonpath: validate JSON column in jsonb_path_exists for inverted index acceleration r=ZhouXing19 a=ZhouXing19
Informs: #154729
Previously, the `jsonb_path_exists` function would attempt inverted index acceleration even when the JSON parameter referenced a column that was not the source column of the inverted index, or when it was a constant JSON value. This resulted in incorrect query plans and potentially wrong results.
This commit adds proper validation to ensure that inverted index acceleration is only used when the JSON parameter is a variable expression that references the actual source column of the inverted index. For all other cases, the query will fall back to a full table scan with post-filtering.
We also don't allow index acceleration for jsonb_path_exists filter if it takes a variable list in its parameters. For example, `jsonb_path_exists(b, '$.a ? (`@.b` == $x)', '{"x": "c"}')` (where `'{"x": "c"}'` is the variable list) is not allowed.
Release note: None
Co-authored-by: ZhouXing19 <[email protected]>
0 commit comments