I am using a PostgreSQL database.
I have my plpgsql FUNCTION, which returns a single recordwith an arbitrary number of columns.
Due to this arbitrariness, I will need to use something like:
SELECT * FROM my_function(97)
But this does not work, as Postgres gives me the following error:
column list required for functions returning a record
But if I do this:
SELECT my_function(97)
I see the expected result, but encapsulated in a single column.
Is there a way to get the expected result as a set of columns according to the purpose of the function, and not a single column that encapsulates all of them?
source
share