Re: question re org.postgresql.util.PSQLException

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: william(dot)ford(at)emc(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: question re org.postgresql.util.PSQLException
Date: 2012-07-18 15:39:20
Message-ID: CADK3HHKVHmSaGw-VOjx5OUV1pfB2V9===bw9WkLkMgE-zY1Tsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Why is this on the ODBC list ?

Yes, you would need to cast the 'x.x.x.x' to an inet address first

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Wed, Jul 18, 2012 at 11:29 AM, <william(dot)ford(at)emc(dot)com> wrote:
> 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.
>
>

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Lionel Elie Mamane 2012-07-23 14:21:17 Re: segfault in SQLSpecialColumns when table name is null string
Previous Message william.ford 2012-07-18 15:29:32 question re org.postgresql.util.PSQLException