Вопрос

I have a table T one of whose columns is pixels array<bigint>. How do I check that a number is its element?

When I try

select * from T where 12345 not in pixels;

I get

FAILED: ParseException line 9:24 missing ( at 'pixels' near '<EOF>'

it appears that one can use in only with literal arrays.

what do I do?

Это было полезно?

Решение

The answer appears to be array_contains:

select * from T where not array_contains(pixels,cast(12345 as bigint));
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top