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

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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: