Re: Selecting a JSON object of arrays from a PostgreSQL table - Mailing list pgsql-general

From Alexander Farber
Subject Re: Selecting a JSON object of arrays from a PostgreSQL table
Date
Msg-id CAADeyWh6hbrNdqnR5caxjZC3vdW4cogxn=nANjFv3_zRX6qhFA@mail.gmail.com
Whole thread Raw
In response to Re: Selecting a JSON object of arrays from a PostgreSQL table  ("Ivan E. Panchenko" <i.panchenko@postgrespro.ru>)
Responses Re: Selecting a JSON object of arrays from a PostgreSQL table  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
Hi Ivan,

On Mon, Jan 1, 2018 at 3:34 PM, Ivan E. Panchenko <i.panchenko@postgrespro.ru> wrote:

select json_object_agg(gid, y) from
    (
         select gid, jsonb_agg(row_to_json(chat)) y
         from chat
         group by gid
    ) x;


01.01.2018 16:41, Alexander Farber пишет:

I have prepared a simple SQL Fiddle demonstrating my problem: http://sqlfiddle.com/#!17/2c9c5/1 


that is great, thank you!

pgsql-general by date:

Previous
From: "Ivan E. Panchenko"
Date:
Subject: Re: Selecting a JSON object of arrays from a PostgreSQL table
Next
From: Martin Moore
Date:
Subject: Slow system due to ReorderBufferGetTupleBuf?