Re: Create array of data from JSONB in PG 9.5

2019-11-15 Thread Tom Lane
Arup Rakshit writes: > I wrote the below SQL which works and give me what I want, but it doesn’t > work in 9.5 version. I wrote this query in PG 10. I want to change it so that > I can run it on 9.5 as production using 9.5 version. I need help on this. > SELECT DISTINCT > ARRAY [jsonb_arr

Re: Create array of data from JSONB in PG 9.5

2019-11-15 Thread Adrian Klaver
On 11/15/19 2:01 AM, Arup Rakshit wrote: Hi, I wrote the below SQL which works and give me what I want, but it doesn’t work in 9.5 version. I wrote this query in PG 10. I want to change it so that I can run it on 9.5 as production using 9.5 version. I need help on this. SELECT DISTINCT

Create array of data from JSONB in PG 9.5

2019-11-15 Thread Arup Rakshit
Hi, I wrote the below SQL which works and give me what I want, but it doesn’t work in 9.5 version. I wrote this query in PG 10. I want to change it so that I can run it on 9.5 as production using 9.5 version. I need help on this. SELECT DISTINCT ARRAY [jsonb_array_elements(data) ->> 'gr