Changes between Version 1 and Version 2 of Ticket #24462, comment 9
- Timestamp:
- May 31, 2021, 1:31:31 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24462, comment 9
v1 v2 1 1 I believe we have a similar need, but for different reasons. 2 2 3 We have a JSONB postgres column and want to `jsonb_array_elements` followed by filtering. Because `jsonb_array_elements` expands into a set of columns, you cannot apply a `where` clause filter on the function column. A simple solution is to use `jsonb_array_elements` in a subquery and then filter the resulting subquery.3 We have a JSONB postgres column and want to use `jsonb_array_elements` followed by filtering. I have introduced a custom `Func`, but because `jsonb_array_elements` expands into a set of columns, you cannot apply a `where` clause filter on the function column. A simple solution is to use `jsonb_array_elements` in a subquery and then filter the resulting subquery. 4 4 5 5 Another use case for sub-querying is being able to apply filters on union queries. Our actual use case involves both `jsonb_array_elements` and `UNION`s.