Project

General

Profile

« Previous | Next » 

Revision 13499

schemas/util.sql: force_recreate(): documented usage, which is somewhat complex and has several important parts

View differences:

trunk/schemas/util.sql
1855 1855
--
1856 1856

  
1857 1857
COMMENT ON FUNCTION force_recreate(cmd text, users text[]) IS '
1858
usage:
1859
SELECT util.force_recreate($$
1860
-- trigger the dependent_objects_still_exist exception
1861
DROP VIEW schemas.main_view; -- *not* CASCADE; it must trigger an exception
1862

  
1863
CREATE VIEW schemas.main_view AS _;
1864

  
1865
-- manually restore views that need to be updated for the changes
1866
CREATE VIEW schemas.dependent_view AS _;
1867
$$);
1868

  
1858 1869
idempotent
1859 1870

  
1860 1871
users: not necessary to provide this because it will be autopopulated

Also available in: Unified diff