Revision 13485
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
3371 | 3371 |
CREATE FUNCTION save_drop_views(views text[]) RETURNS text[] |
3372 | 3372 |
LANGUAGE sql |
3373 | 3373 |
AS $_$ |
3374 |
SELECT array(SELECT util.save_drop_view(view_) |
|
3375 |
FROM unnest(util.array_reverse($1)/*in reverse dependency order*/) view_) |
|
3374 |
SELECT /*return in forward dependency order*/util.array_reverse(array( |
|
3375 |
SELECT util.save_drop_view(view_) |
|
3376 |
FROM unnest(/*drop in reverse dependency order*/util.array_reverse($1)) view_ |
|
3377 |
)) |
|
3376 | 3378 |
$_$; |
3377 | 3379 |
|
3378 | 3380 |
|
Also available in: Unified diff
bugfix: schemas/util.sql: save_drop_views(): views must be dropped in reverse dependency order, but returned in forward dependency order