Search in integer array in Postgres

前端 未结 3 1404
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 04:28

Is there any other way to search for a certain value in an integer[] column in Postgres?

My currently installed Postgres version does not allow the

3条回答
  •  广开言路
    2021-02-04 05:07

    quickly search will be so, but you should use index gist or gin for intarray type Postgres intarray

     SELECT * FROM table WHERE values @> ARRAY[10];
    

提交回复
热议问题