Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Karen Goh <karenworld(at)yahoo(dot)com>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer?
Date: 2019-07-16 14:28:43
Message-ID: 871ryq12hp.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>>>>> "Karen" == Karen Goh <karenworld(at)yahoo(dot)com> writes:

Karen> Yes. I have downloaded and it is inside my Program Files.

What exactly is in your Program Files?

Karen> And now I am getting another error :

Karen> org.postgresql.util.PSQLException: ERROR: operator does not exist: text = character varying[]

Someone just asked this a few minutes ago on the IRC channel but left
without acknowledging my response; was that you?

Karen> But, I check stackoverflow, it is mentioned that text is the
Karen> best definition. And this is what I used for subject_name which
Karen> is a list I am getting from the In clause.

character varying[] means _array of varchar_, of course you can't
compare an array directly against a scalar.

If you want to pass an array value as a parameter, you can't use IN (x), you
have to use = ANY (x) instead.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Karen Goh 2019-07-16 15:02:13 Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer?
Previous Message Karen Goh 2019-07-16 14:19:40 Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer?