How do I return the data types of a query from a Postgres SQL database?
Is there a function I can put in my query to do this for a particular column, I am wondering this especially for calculated columns.
You're looking for a function pg_typeof(any).
For your case it can be used as:
SELECT pg_typeof(calculated_column_name) FROM (your_main_query_here);