Query Error: GatewayException: Unknown SQL type: 2003 caused by SQLException: Unknown SQL type: 2003

You are trying to retrieve a column or expression result from SQL that yields an array data type. Those don't map to vanilla JDBC, so you can't pull them into Ignition (as arrays). Change your SQL expressions to perform the complete array operation in SQL and return an ordinary data type.

As it happens, Ignition's "Prep" queries hand off argument processing to the actual JDBC driver, so it is possible to send arrays to Postgres. See this if you are interested: