Using XML and XPath in PostgreSQL database

Everybody knows, that PostgreSQL is one of the best open-source RDBMS. The keyword here is „relational” database. For most purposes relational structure is okay, but sometimes we have to store highly complicated hierarchical data. Mapping such hierarchical structure to relational tables could be a real pain. A simple solution is to use a hierarchical markup language to present our data – XML. Luckily PostgreSQL provides a data type for storing XML documents. I was very optimistic about it, but it didn’t meet all my expectations.

Read more