You can translate the question and the replies:

Postgres WHERE condition by UUID

We need to be able to select by UUID against a postgres database but it seems there is a casting problem The underlying query is of a view SELECT <cols> from database_view WHERE UUID = <some known uuid> > QUERY [JDBC ROUTE] [ERROR] Received exception with message 'ERROR: operator does not exist: uuid = character varying > Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. I've seen [this link]( in the documentation about Cassandra WHERE condition failing involving UUID. I have tried to cast in denodo but am not having much luck Using default Postgres 10 Adapter and we are connecting to an AWS Aurora instance Driver class path: 'postgresql-10' Driver class: org.postgres.Driver Help Appreciated
16-11-2020 01:56:42 -0500

1 Answer

Hello, SQL Standards do not define the UUID as a valid SQL Type and the JDBC Specification does not consider the UUID as valid datatype. So, when used in prepared statement, that is, when created as a bind variable it needs to be modeled using the setobject method as UUID. This is a known limitation in the PostGres JDBC Driver and datatypes. To work around this limitation, you can make use of the parameter "Allow Literal as Parameters" on the datasource and ensure the query is sent as String Literal rather than a preparedstatement. You can, * Edit the PostGres Datasource * Navigate to the Source Configuration tab. * Locate the parameter "Allow Literals as parameter" and change it to No. * Save the datasource and try the query again. Hope this helps
Denodo Team
25-11-2020 19:44:11 -0500
You must sign in to add an answer. If you do not have an account, you can register here