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

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: how to resolve org.postgresql.util.PSQLException: ERROR: operator does not exist: text = integer?
Дата
Msg-id 87sgr6ypvp.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: how to resolve org.postgresql.util.PSQLException: ERROR:operator does not exist: text = integer?  (Karen Goh <karenworld@yahoo.com>)
Ответы Re: how to resolve org.postgresql.util.PSQLException: ERROR:operator does not exist: text = integer?
Список pgsql-sql
>>>>> "Karen" == Karen Goh <karenworld@yahoo.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)



В списке pgsql-sql по дате отправления:

Предыдущее
От: Karen Goh
Дата:
Сообщение: Re: how to resolve org.postgresql.util.PSQLException: ERROR:operator does not exist: text = integer?
Следующее
От: Karen Goh
Дата:
Сообщение: Re: how to resolve org.postgresql.util.PSQLException: ERROR:operator does not exist: text = integer?