Project

General

Profile

« Previous | Next » 

Revision 12343

schemas/util.sql: added drop_relation(relation text, type text)

View differences:

util.sql
1070 1070

  
1071 1071

  
1072 1072
--
1073
-- Name: drop_relation(text, text, boolean); Type: FUNCTION; Schema: util; Owner: -
1074
--
1075

  
1076
CREATE FUNCTION drop_relation(relation text, type text, force boolean DEFAULT false) RETURNS void
1077
    LANGUAGE sql
1078
    AS $_$
1079
SELECT util.eval($$DROP $$||$2||$$ IF EXISTS $$||$1
1080
||util._if($3, $$ CASCADE$$, ''::text))
1081
$_$;
1082

  
1083

  
1084
--
1085
-- Name: FUNCTION drop_relation(relation text, type text, force boolean); Type: COMMENT; Schema: util; Owner: -
1086
--
1087

  
1088
COMMENT ON FUNCTION drop_relation(relation text, type text, force boolean) IS '
1089
idempotent
1090
';
1091

  
1092

  
1093
--
1073 1094
-- Name: drop_table(text, boolean); Type: FUNCTION; Schema: util; Owner: -
1074 1095
--
1075 1096

  

Also available in: Unified diff