Re: json accessors - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: json accessors
Date
Msg-id 50BF8CA9.3040709@dunslane.net
Whole thread Raw
In response to Re: json accessors  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: json accessors
List pgsql-hackers
On 12/05/2012 12:29 PM, David E. Wheeler wrote:
> On Dec 5, 2012, at 9:21 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>>> For sufficiently large columns, I expect I would want a GIN index to speed JSON value extraction queries. Possible
withthis proposal?
 
>> Probably not.
> That greatly reduces its utility for querying, though not, of course, for using it in procedural code.
>
> Wouldn't using a jsonpath-style implementation allow for indexing?


Indexing tree-like data isn't at all easy. We don't index XML either. 
There has been discussion of this sort of indexing it in the past, and a 
couple of people have said they would work on it, but I have not seen a 
proposal or a single line of code.

Jsonpath on its own would not do what you're suggesting. A first 
approach to indexing treeish data requires that you generate all the 
possible paths and index that. That would be quite explosive in volume. 
And anyway, jsonpath is not on offer here.

I'm sorry what I have offered isn't what you want, but plenty of other 
people have told me it will go a long way meeting their needs.

cheers

andrew





pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: json accessors
Next
From: Tom Lane
Date:
Subject: Re: Dumping an Extension's Script