= any((select )) needs cast, why?
От | Frank van Vugt |
---|---|
Тема | |
Дата | |
Msg-id | 201111121210.03296.ftm.van.vugt@foxi.nl обсуждение исходный текст |
Ответы |
Re: |
Список | pgsql-general |
L.S. Could someone point me to the formal reason why in: postgres=# select version(); version --------------------------------------------------------------------------------------- PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.3.3, 64-bit (1 row) the cast to int[ ] of the result row is needed here: postgres=# select 1 = any((select ARRAY[1,2])::int[]); ?column? ---------- t (1 row) in order to avoid an error: postgres=# select 1 = any((select ARRAY[1,2])); ERROR: operator does not exist: integer = integer[] LINE 1: select 1 = any((select ARRAY[1,2])); ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. Is the right hand side resulting in an array of an array or....? -- Best, Frank.
В списке pgsql-general по дате отправления: