You can create a query that invokes a table function that is correlated on a table function, which is called chaining table functions.
mydb.schema(usr1)=> SELECT t.order_id, t.prod_codes, f.product_id,
x.product_id FROM orders t JOIN TABLE(parseNames(prod_codes)) AS f ON
TRUE JOIN TABLE (parseNames(f.product_id)) x ON TRUE ORDER BY
order_id;
mydb.schema(usr1)=> SELECT t.order_id, t.prod_codes, f.product_id FROM orders
t JOIN TABLE(parseNames(prod_codes)) AS f ON TRUE ORDER BY order_id;
ORDER_ID | PROD_CODES | PRODUCT_ID
----------+-----------------------+------------
120 | 28,36,80 | 28
120 | 28,36,80 | 36
120 | 28,36,80 | 80
124 | 124,6,12,121 | 124
124 | 124,6,12,121 | 6
124 | 124,6,12,121 | 12
124 | 124,6,12,121 | 121
...
(34 rows)
mydb.schema(usr1)=> SELECT t.order_id, t.prod_codes, f.product_id,
x.product_id FROM orders t JOIN TABLE(parseNames(prod_codes)) AS f ON
TRUE JOIN TABLE (parseNames(f.product_id)) x ON TRUE ORDER BY
order_id;
ORDER_ID | PROD_CODES | PRODUCT_ID | PRODUCT_ID
----------+-----------------------+------------+------------
120 | 28,36,80 | 28 | 28
120 | 28,36,80 | 36 | 36
120 | 28,36,80 | 80 | 80
124 | 124,6,12,121 | 124 | 124
124 | 124,6,12,121 | 6 | 6
124 | 124,6,12,121 | 12 | 12
124 | 124,6,12,121 | 121 | 121
...
(34 rows)