Project

General

Profile

« Previous | Next » 

Revision 12346

schemas/util.sql: drop_table(), drop_view(): use drop_relation(relation text, type text)

View differences:

util.sql
1093 1093
CREATE FUNCTION drop_table(table_ text, force boolean DEFAULT false) RETURNS void
1094 1094
    LANGUAGE sql STRICT
1095 1095
    AS $_$
1096
SELECT util.eval($$DROP TABLE IF EXISTS $$||$1
1097
||util._if($2, $$ CASCADE$$, ''::text))
1096
SELECT util.drop_relation($1, 'TABLE', $2)
1098 1097
$_$;
1099 1098

  
1100 1099

  
......
1114 1113
CREATE FUNCTION drop_view(view_ text, force boolean DEFAULT false) RETURNS void
1115 1114
    LANGUAGE sql STRICT
1116 1115
    AS $_$
1117
SELECT util.eval($$DROP VIEW IF EXISTS $$||$1
1118
||util._if($2, $$ CASCADE$$, ''::text))
1116
SELECT util.drop_relation($1, 'VIEW', $2)
1119 1117
$_$;
1120 1118

  
1121 1119

  

Also available in: Unified diff