So write yourown udf in your favourite language or write stored procedure eg. make_crosstab(sql varchar(500)) which parse sql and create crosstab selectable procedure in fly from given sql. You will be able to select * from crosstab as in postgres.
-- regards, Michał Kurczabiński