question re org.postgresql.util.PSQLException

From: <william(dot)ford(at)emc(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: question re org.postgresql.util.PSQLException
Date: 2012-07-18 15:29:32
Message-ID: 9669BFD32C6AD34B93E3ACC12ADD24E62CD20198@MX43A.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. :) 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.

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Cramer 2012-07-18 15:39:20 Re: question re org.postgresql.util.PSQLException
Previous Message Andrea Ricci 2012-07-18 12:44:01 Re: ByteA column retrieved in 31 minutes ...