Project

General

Profile

« Previous | Next » 

Revision 14344

bugfix: schemas/util.sql: rematerialize_view(): don't populate unless recreate() can successfully recreate the dependent views, to avoid populating the entire table (which for some views can take hours) only to have the changes rolled back by a failing dependent view

View differences:

util.sql
4705 4705
    AS $_$
4706 4706
SELECT util.recreate($$
4707 4707
SELECT util.drop_table($$||util.quote_typed($1)||$$);
4708
SELECT util.copy($$||util.quote_typed($2)||$$, $$||util.quote_typed($1)||$$);
4708
SELECT util.copy_struct($$||util.quote_typed($2)||$$, $$||
4709
util.quote_typed($1)||$$);
4709 4710
$$);
4711
/* don't populate unless recreate() can successfully recreate the dependent
4712
views, to avoid populating the entire table (which for some views can take
4713
hours) only to have the changes rolled back by a failing dependent view */
4714
SELECT util.copy_data($2, $1);
4710 4715
$_$;
4711 4716

  
4712 4717

  

Also available in: Unified diff