Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Will the JSON type have document indexing or is it just a text store that will validate that it's JSON.


You don't necessarily need special support for that. There's no special XML indexing support, but you can use the XPath and XSLT functions to extract the data of interest and index that:

    CREATE TABLE foo (a_doc xml);
    CREATE INDEX doc_title ON foo ((xpath('/root@title', a_doc));
I don't see any JSON functions for extracting data in the devel documentation, but that's what you would be waiting on, and it could probably be added by an extension without having to wait for built-in support.


There's no native function, but it can easily be implemented. See sickpig's answer (sibling to your post) for a Javascript-based solution.


just validation, json core type it's intentionally very minimal (see postgres hackers mailing list archives for more details)

anyway as a possible workaround just see andrew dustan's post:

http://people.planetpostgresql.org/andrew/index.php?/archive...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: