postgresql: dynamically casting columns returned by a query
I have a DB in postgres with two tables, 'responses' and 'variables', like this: responses respondent_id variable_name response 01 name susan 01 age 42 02 name bob 02 age 13 variables variable_name type name text age integer Note: The data…