If myFunc
is a set-returning function, you can move it from the FROM
part to the SELECT
part, while referencing each member of the set returning record type that you want.
SELECT the_table_with_geom.some_primary_key,
(myFunc(geom)).val1, (myFunc(geom)).val2
FROM the_table_with_geom;