Re: query on smallint array column

2020-12-13 Thread Zhihong Yu
Thanks Pavel for fast response. On Sun, Dec 13, 2020 at 9:51 AM Pavel Stehule wrote: > Hi > > ne 13. 12. 2020 v 18:42 odesílatel Zhihong Yu napsal: > >> Hi, >> I was experimenting with the following query. >> >> create table sint1(k int primary key, arr smallint[]); >> create index s1 on sint1(

Re: query on smallint array column

2020-12-13 Thread Pavel Stehule
Hi ne 13. 12. 2020 v 18:42 odesílatel Zhihong Yu napsal: > Hi, > I was experimenting with the following query. > > create table sint1(k int primary key, arr smallint[]); > create index s1 on sint1(arr); > insert into sint1 select s, array[s*s, s] FROM generate_series(1, 10) AS s; > select * from

query on smallint array column

2020-12-13 Thread Zhihong Yu
Hi, I was experimenting with the following query. create table sint1(k int primary key, arr smallint[]); create index s1 on sint1(arr); insert into sint1 select s, array[s*s, s] FROM generate_series(1, 10) AS s; select * from sint1 where arr @> array[4]; ERROR: operator does not exist: smallint[]