Re: Postgres 9.6 - ltree extension - (re)build a tree on a table - Mailing list pgsql-sql

From David G. Johnston
Subject Re: Postgres 9.6 - ltree extension - (re)build a tree on a table
Date
Msg-id CAKFQuwYggqUSW_yTui5U+1PzEK1+UA7zcj+4MepWV95tKD-NCQ@mail.gmail.com
Whole thread Raw
In response to Postgres 9.6 - ltree extension - (re)build a tree on a table  (Luca <lordluke80@gmail.com>)
List pgsql-sql
On Tue, Apr 17, 2018 at 3:11 AM, Luca <lordluke80@gmail.com> wrote:
Since this table should be updated after a data import, so after a massive upsert, ideally I would i'd like to have a function 
called after that is completed, in order to (re)build the 'path' column for each record, which means rebuild the tree.

​Have you considered/tried an "FOR EACH STATEMENT" trigger instead of "FOR EACH ROW"​?

The transition tables feature introduced in v10 probably will be of significant help here as well - though I haven't any practical experience with it personally.


David J.

pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: Postgres 9.6 - ltree extension - (re)build a tree on a table
Next
From: Gary Stainburn
Date:
Subject: summary view design / performance