I’ve got a situation building a data analysis tool where my users can write SQL query (including joins, calculations, etc) and I need to be provide options to the user based on the data types of the columns in the result. I’m using JDBC to connect to Postgres. Is there any way to get Postgres to report the data type of a computed column?
Share
With JDBC, you should be able to call .getMetaData() in your ResultSet, and iterate through the columns and e.g. learn their types with .getColumnType()