Table column vales to JSON object keys? - Mailing list pgsql-admin

From Wells Oliver
Subject Table column vales to JSON object keys?
Date
Msg-id CAOC+FBU_ChUfOhVC9LJFOFwzQYH2=ZEBpY_cbNTL8zhexJvQow@mail.gmail.com
Whole thread Raw
Responses Re: Table column vales to JSON object keys?
List pgsql-admin
Trying to go from a table like:

 g  | e |  angle | path
----+---+--------+----------------------
 g1 | e1 | a1    | http://foo.com/a.mp4
 g1 | e1 | a2    | http://foo.com/b.mp4
 g1 | e1 | a3    | http://foo.com/c.mp4


To a table like this, with a column value per angle as a key.

 g  | e |  obj
----+---+---------------------------------------------------------------------------------------------
 g1 | e1 | {"a1": "http://foo.com/a.mp4", "a2": "http://foo.com/b.mp4", "a3": "http://foo.com/c.mp4"}

 
Can't quite get there.

--

pgsql-admin by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pglogical with bytea values
Next
From: "David G. Johnston"
Date:
Subject: Re: Table column vales to JSON object keys?