G’day,
I have databases (psql 8.3) that currently consist of “xml” blobs as text type within the database. Now, I’ve gone through each of these blobs, created a schema which the data should adhere to and made sure the current blobs in the DB validate against that schema. Now, my question is:
text to xml, would I encounter any major problems? Thanks!
It depends on how you use that XML data.
If you always retrieve them from the database as a single value and do all XML processing (e.g. XSLT or extracting information) in your application I would stick with the
textdata type.If you regularily query the XML using PostgreSQL xml functions and need to index those queries, then using a
xmltypecolumn is probably better.