Re: [GENERAL] row_to_json question

2012-06-25 Thread Merlin Moncure
On Sat, Jun 23, 2012 at 5:15 PM, Joe Van Dyk wrote: > On Sat, Jun 23, 2012 at 3:03 PM, Joe Van Dyk wrote: >> How can I use row_to_json for a subset of columns in a row? (without >> creating a new view or using a CTE?) >> >> What I want returned: >> {"email_address":"j...@tanga.com","username":"jo

Re: [GENERAL] row_to_json question

2012-06-23 Thread Raghavendra
Also try: https://bitbucket.org/adunstan/json_91 --Raghav On Sun, Jun 24, 2012 at 3:45 AM, Joe Van Dyk wrote: > On Sat, Jun 23, 2012 at 3:03 PM, Joe Van Dyk wrote: > > How can I use row_to_json for a subset of columns in a row? (without > > creating a new view or using a CTE?) > > > > What I

Re: [GENERAL] row_to_json question

2012-06-23 Thread Joe Van Dyk
On Sat, Jun 23, 2012 at 3:03 PM, Joe Van Dyk wrote: > How can I use row_to_json for a subset of columns in a row? (without > creating a new view or using a CTE?) > > What I want returned: > {"email_address":"j...@tanga.com","username":"joevandyk"} > Note that there is no "id" column in the result.

[GENERAL] row_to_json question

2012-06-23 Thread Joe Van Dyk
How can I use row_to_json for a subset of columns in a row? (without creating a new view or using a CTE?) What I want returned: {"email_address":"j...@tanga.com","username":"joevandyk"} Note that there is no "id" column in the result. create table users (id serial primary key, email_address varc