Re: using hstore to store documents

From: Rita <rmorgan466(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: using hstore to store documents
Date: 2017-01-31 10:57:29
Message-ID: CAOF-Kfh--RSh7n0Mjdey++TP7uB6ajhi2-3pEVhX34n3ZVWfqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think Xpath in postgresql is fast enough. I am dumping the raw xml file
into a table and then generating data from it. I want all the data to be
consistent thats why I am using a database.

I am planning to use triggers to generate content of
table1_master...table2_master, etc...

master -> table 1_master
-> table 2_master
-> table 3_master -> table 1_table3

On Sun, Jan 29, 2017 at 9:45 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Saturday, January 28, 2017, Rita <rmorgan466(at)gmail(dot)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.

--
--- Get your facts first, then you can distort them as you please.--

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Egon Frerich 2017-01-31 13:45:20 Why is table not found?
Previous Message Nikolai Zhubr 2017-01-31 08:45:33 Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).