Project

General

Profile

« Previous | Next » 

Revision 12345

schemas/util.sql: drop_relation(regclass): use simpler drop_relation(relation text, type text)

View differences:

trunk/schemas/util.sql
1052 1052
CREATE FUNCTION drop_relation(relation regclass, force boolean DEFAULT false) RETURNS void
1053 1053
    LANGUAGE sql
1054 1054
    AS $_$
1055
SELECT (CASE
1056
WHEN util.is_table($1) THEN util.drop_table($1::text, $2)
1057
WHEN util.is_view($1)  THEN util.drop_view ($1::text, $2)
1058
-- otherwise, throw case_not_found error
1059
END)
1055
SELECT util.drop_relation($1::text, util.relation_type($1), $2)
1060 1056
$_$;
1061 1057

  
1062 1058

  

Also available in: Unified diff