Re: additional json functionality - Mailing list pgsql-hackers

From Mike Blackwell
Subject Re: additional json functionality
Date
Msg-id CANPAkgt+7h+soycZduBAwSCR662oCC3491kt5Kb3nnj22tkioQ@mail.gmail.com
Whole thread Raw
In response to Re: additional json functionality  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers


On Wed, Nov 13, 2013 at 4:16 PM, Josh Berkus <josh@agliodbs.com> wrote:

> Putting it all together, I'd consider:
> *) dropping json_object (although maybe there is a case I'm not
thinking about)
> *) changing json_build function names to get the json prefix
> *) adding a json object constructor that takes two parallel arrays as
> arguments.

I was with you until the third idea.  Huh?
​​

​I actually had a use case for this today, though with hstore, importing a fixed length record with​ something along the lines of:

hstore(
  ARRAY['field 1', 'field 2', 'field 3'],
  regexp_matches(fixed_field,'(.{4})(.{10})(.{5})')
)

__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401 
Office: 630.313.7818 
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: additional json functionality
Next
From: Josh Berkus
Date:
Subject: Re: additional json functionality