Revision 14165
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
898 | 898 |
|
899 | 899 |
|
900 | 900 |
-- |
901 |
-- Name: check_constraint_disable(check_constraint_def); Type: FUNCTION; Schema: util; Owner: - |
|
902 |
-- |
|
903 |
|
|
904 |
CREATE FUNCTION check_constraint_disable(constraint_def check_constraint_def) RETURNS void |
|
905 |
LANGUAGE sql |
|
906 |
AS $$ |
|
907 |
SELECT util.check_constraint_replace((constraint_def.constraint_, |
|
908 |
util.check_constraint_expr_disable(constraint_def.expr))) |
|
909 |
$$; |
|
910 |
|
|
911 |
|
|
912 |
-- |
|
913 |
-- Name: FUNCTION check_constraint_disable(constraint_def check_constraint_def); Type: COMMENT; Schema: util; Owner: - |
|
914 |
-- |
|
915 |
|
|
916 |
COMMENT ON FUNCTION check_constraint_disable(constraint_def check_constraint_def) IS ' |
|
917 |
also accepts a util.table_item via implicit cast |
|
918 |
|
|
919 |
usage: |
|
920 |
SELECT util.check_constraint_disable((table, constraint_name)::util.table_item); |
|
921 |
|
|
922 |
**WARNING**: *not* idempotent, unlike util.check_constraint_enable() |
|
923 |
'; |
|
924 |
|
|
925 |
|
|
926 |
-- |
|
901 | 927 |
-- Name: check_constraint_drop(table_item); Type: FUNCTION; Schema: util; Owner: - |
902 | 928 |
-- |
903 | 929 |
|
Also available in: Unified diff
schemas/util.sql: added check_constraint_disable()