3 ms·
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 o
by fusiongyro 14y ago
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.
- pygy_ 14y agoThere's no native function, but it can easily be implemented. See sickpig's answer (sibling to your post) for a Javascript-based solution.