When running select on Postgres over java
SELECT '' AS COL1, 0 AS COL2 FROM MYTABLE 1=2;
Column type Types.OTHER
for both COL1 and COL2. As you can see, the results do not have a single row.
But if I have rows in the result set using the following query:
SELECT '' AS COL1, 0 AS COL2 FROM MYTABLE;
Type COL1 is still Types.OTHER
, but type COL2 Types.INTEGER
. In my case, I need Types.VARCHAR
and Types.INTEGER
, even the result is empty or not.
Are there any configurations at the db or jdbc url level to receive Types.VARCHAR
and Types.INTEGER
how for the two requests.
source
share