Re: idea: allow AS label inside ROW constructor - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: idea: allow AS label inside ROW constructor
Date
Msg-id CAHyXU0zbrJCFKA6+_BDstGwrT7Di6Jegro6issAUEYo75+spfw@mail.gmail.com
Whole thread Raw
In response to Re: idea: allow AS label inside ROW constructor  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: idea: allow AS label inside ROW constructor
List pgsql-hackers
On Thu, Oct 23, 2014 at 4:34 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> Hi
>
> here is a prototype
>
> postgres=# select row_to_json(row(10 as A, row(30 as c, 20 AS B) as x));
>          row_to_json
> ------------------------------
>  {"a":10,"x":{"c":30,"b":20}}
> (1 row)
>
> postgres=# select row_to_json(row(10, row(30, 20)));
>            row_to_json
> ----------------------------------
>  {"f1":10,"f2":{"f1":30,"f2":20}}
> (1 row)

wow -- this is great.   I'll take a a look.

merlin



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves)
Next
From: Fujii Masao
Date:
Subject: Re: psql \watch versus \timing