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

"David G. Johnston" <[email protected]> Tue, 16 Jul 2019 09:00:46 -0700
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <CAKFQuwb_G5L9sY8hFxKD=HW_dGS57tmn+geL1ztGBMB4kWsUMQ@mail.gmail.com>
On Tue, Jul 16, 2019 at 8:44 AM Karen Goh <[email protected]> wrote:

> I have been told In clause in the way to do it.
> So, not sure why am I getting that error....
>

Your query only has one comparison operation, ANY. In order for the query
to get as far as it did it must have two question marks present in the ANY
expression (since you've set two parameters in Java).  Since the left side
of the ANY equality is subject_name you are attempting to compare against
the text type.

So explain why you think sticking an integer into the first parameter
location is something that makes sense here; i.e., ps2.setInt(1, tutor_id);
because that, with the information you've provided, is your error.

David J.