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 15:21:31 |
Message-ID: | 87sgr6ypvp.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:
>> What exactly is in your Program Files?
Karen> PostgreSQL which has folder named 10 and then open up you will
Karen> get to see bin folder, data folder, script folder ....
OK, and did you try doing "SHOW log_destination;" as a query, for
example in the pgadmin4 query window? also "SHOW logging_collector;"
and "SHOW data_directory;"
>> If you want to pass an array value as a parameter, you can't use IN
>> (x), you have to use = ANY (x) instead.
Karen> Is Any (x) this format applies only to Postgresql ?
scalar = ANY (arrayvalue) is a postgresql extension, yes.
The SQL spec says that the syntax
(col IN (1,2,3))
is equivalent to
(col = ANY (VALUES (1),(2),(3)))
but this doesn't allow you to pass a single array parameter for the IN
list either in PostgreSQL or in standard SQL. In both PostgreSQL and
standard SQL you can do:
(col = ANY (select v from unnest(arrayvalue) as u(v)))
but this isn't the recommended style for PostgreSQL because it is less
efficient.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Karen Goh | 2019-07-16 15:44:03 | Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer? |
Previous Message | Karen Goh | 2019-07-16 15:02:13 | Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer? |