Changes between Version 1 and Version 2 of Ticket #24462, comment 9


Ignore:
Timestamp:
May 31, 2021, 1:31:31 PM (3 years ago)
Author:
Jameel A.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24462, comment 9

    v1 v2  
    11I believe we have a similar need, but for different reasons.
    22
    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.
     3We 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.
    44
    55Another 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.
Back to Top