On 1/20/17 5:38 PM, Nico Williams wrote:
If these triggers could be automatically generated, that sure would be
nice, but some control would be needed over when to update the MV vs.
mark it as needing a refresh.

FWIW, pg_classy[1], which is still a work in progress, would allow for that. The idea is that you define a code template which you can then call with arguments (such as the name of a matview table), and those arguments get put into the template before executing the resulting SQL.

Most of the basic framework for that is in place; I just need to finish code that will allow for the extension to track arbitrary database objects that were created.

1: https://github.com/decibel/pg_classy/blob/master/doc/pg_classy.asc
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to