Search Postgresql Archives

Re: Selecting a JSON object of arrays from a PostgreSQL table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ivan,

On Mon, Jan 1, 2018 at 3:34 PM, Ivan E. Panchenko <i.panchenko@xxxxxxxxxxxxxx> 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!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux