question re org.postgresql.util.PSQLException - Mailing list pgsql-odbc

From
Subject question re org.postgresql.util.PSQLException
Date
Msg-id 9669BFD32C6AD34B93E3ACC12ADD24E62CD20198@MX43A.corp.emc.com
Whole thread Raw
Responses Re: question re org.postgresql.util.PSQLException
List pgsql-odbc

The following query works in pgAdmin query tool but not when run within a java pgm.  Don’t see any postings with inet as the culprit type for the error.  And yes  the OR subclause is redundant. Didn’t catch it till reviewing the error.

 

Anyone see anything like this and what the cause is?  I have the same statement (no OR clause) working with C# and both the postgres and default ODBC drivers.  Not sure which driver my colleague was using but presume Postgres from the error msg. Changed values to protect the guilty. J  Java related?

 

SELECT f1, f2, f3, f4 FROM schema.tbl WHERE 'x.x.x.x' between low_address AND high_address AND fld10 = 0 OR 'x.x.x.x' between low_address AND high_address AND fld10 count = 0

 

org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying >= inet

  Hint: No operator matches the given name and argument type(s). You may need to add explicit type casts.

  Position: 163

 

The actual character at position 163 was the first dot after the first address’s digit, ie., x. after the WHERE.

 

Thanks in advance.

 

pgsql-odbc by date:

Previous
From: Andrea Ricci
Date:
Subject: Re: ByteA column retrieved in 31 minutes ...
Next
From: Dave Cramer
Date:
Subject: Re: question re org.postgresql.util.PSQLException