On Saturday, January 28, 2017, Rita <rmorgan...@gmail.com> wrote:

> After xmltest has been populated, I can run xpath and unest to get my data
> into a row but I would like to store that result in another table, I am
> guessing I should look into triggers for something like that?
>

I suspect that using xpath in the database is not the right tool for doing
what you describe.  Whatever middleware layer receives the XML should be
considered for the logic of deserialization and storage to the database in
normalized form.  If you do want something like that in the database I'd
probably write a volatile function the receives xml and does whatever it
needs to do.  I cannot imagine the indirection of a trigger would be
gainful here.

In particular, at scale you'd probably be better off with using a streaming
parser instead of a DOM one.

David J.

Reply via email to