Revision 11652
Added by Aaron Marcuse-Kubitza about 11 years ago
schemas/util.sql | ||
---|---|---|
1641 | 1641 |
|
1642 | 1642 |
|
1643 | 1643 |
-- |
1644 |
-- Name: save_drop_view(text); Type: FUNCTION; Schema: util; Owner: - |
|
1645 |
-- |
|
1646 |
|
|
1647 |
CREATE FUNCTION save_drop_view(view_ text) RETURNS text |
|
1648 |
LANGUAGE plpgsql STRICT |
|
1649 |
AS $_$ |
|
1650 |
DECLARE |
|
1651 |
result text = NULL; |
|
1652 |
BEGIN |
|
1653 |
BEGIN |
|
1654 |
result = util.show_create_view(view_); |
|
1655 |
PERFORM util.eval($$DROP VIEW $$||view_); |
|
1656 |
EXCEPTION |
|
1657 |
WHEN undefined_table THEN NULL; |
|
1658 |
END; |
|
1659 |
RETURN result; |
|
1660 |
END; |
|
1661 |
$_$; |
|
1662 |
|
|
1663 |
|
|
1664 |
-- |
|
1644 | 1665 |
-- Name: schema(regtype); Type: FUNCTION; Schema: util; Owner: - |
1645 | 1666 |
-- |
1646 | 1667 |
|
Also available in: Unified diff
schemas/util.sql: added save_drop_view()