Revision 14164
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
904 | 904 |
CREATE FUNCTION check_constraint_drop(constraint_ table_item) RETURNS void |
905 | 905 |
LANGUAGE sql |
906 | 906 |
AS $_$ |
907 |
SELECT util.eval($$ALTER TABLE $$||constraint_.table_||$$ DROP CONSTRAINT $$||
|
|
908 |
quote_ident(constraint_.name)) |
|
907 |
SELECT util.eval($$ALTER TABLE $$||constraint_.table_ |
|
908 |
||$$ DROP CONSTRAINT IF EXISTS $$||quote_ident(constraint_.name))
|
|
909 | 909 |
$_$; |
910 | 910 |
|
911 | 911 |
|
Also available in: Unified diff
bugfix: schemas/util.sql: check_constraint_drop(): need IF EXISTS