Execute a dynamic crosstab query
What you ask for is impossible. SQL is a strictly typed language. PostgreSQL functions need to declare a return type (RETURNS ..) at the time of creation. A limited way around this is with polymorphic functions. If you can provide the return type at the time of the function call. But that’s not evident from … Read more