Revision 12364
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
1062 | 1062 |
-- Name: drop_relation(text, text, boolean); Type: FUNCTION; Schema: util; Owner: - |
1063 | 1063 |
-- |
1064 | 1064 |
|
1065 |
CREATE FUNCTION drop_relation(type text, relation text, force boolean DEFAULT false) RETURNS void |
|
1065 |
CREATE FUNCTION drop_relation(type text, relation_esc text, force boolean DEFAULT false) RETURNS void
|
|
1066 | 1066 |
LANGUAGE sql |
1067 | 1067 |
AS $_$ |
1068 | 1068 |
SELECT util.eval($$DROP $$||$1||$$ IF EXISTS $$||$2 |
... | ... | |
1071 | 1071 |
|
1072 | 1072 |
|
1073 | 1073 |
-- |
1074 |
-- Name: FUNCTION drop_relation(type text, relation text, force boolean); Type: COMMENT; Schema: util; Owner: - |
|
1074 |
-- Name: FUNCTION drop_relation(type text, relation_esc text, force boolean); Type: COMMENT; Schema: util; Owner: -
|
|
1075 | 1075 |
-- |
1076 | 1076 |
|
1077 |
COMMENT ON FUNCTION drop_relation(type text, relation text, force boolean) IS ' |
|
1077 |
COMMENT ON FUNCTION drop_relation(type text, relation_esc text, force boolean) IS '
|
|
1078 | 1078 |
idempotent |
1079 | 1079 |
'; |
1080 | 1080 |
|
... | ... | |
2416 | 2416 |
-- Name: rename_relation(text, text); Type: FUNCTION; Schema: util; Owner: - |
2417 | 2417 |
-- |
2418 | 2418 |
|
2419 |
CREATE FUNCTION rename_relation(from_ text, to_ text) RETURNS void
|
|
2419 |
CREATE FUNCTION rename_relation(from_esc text, to_name text) RETURNS void
|
|
2420 | 2420 |
LANGUAGE sql |
2421 | 2421 |
AS $_$ |
2422 | 2422 |
/* 'ALTER TABLE can be used with views too' |
... | ... | |
2427 | 2427 |
|
2428 | 2428 |
|
2429 | 2429 |
-- |
2430 |
-- Name: FUNCTION rename_relation(from_ text, to_ text); Type: COMMENT; Schema: util; Owner: -
|
|
2430 |
-- Name: FUNCTION rename_relation(from_esc text, to_name text); Type: COMMENT; Schema: util; Owner: -
|
|
2431 | 2431 |
-- |
2432 | 2432 |
|
2433 |
COMMENT ON FUNCTION rename_relation(from_ text, to_ text) IS '
|
|
2433 |
COMMENT ON FUNCTION rename_relation(from_esc text, to_name text) IS '
|
|
2434 | 2434 |
idempotent |
2435 | 2435 |
'; |
2436 | 2436 |
|
Also available in: Unified diff
fix: schemas/util.sql: drop_relation(text), rename_relation(text, text): appended _esc to params that should be passed in escaped, and _name to those that shouldn't