Revision 14371
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
2423 | 2423 |
|
2424 | 2424 |
|
2425 | 2425 |
-- |
2426 |
-- Name: drop_derived_col(col, boolean); Type: FUNCTION; Schema: util; Owner: - |
|
2427 |
-- |
|
2428 |
|
|
2429 |
CREATE FUNCTION drop_derived_col(col col, force boolean DEFAULT false) RETURNS void |
|
2430 |
LANGUAGE sql |
|
2431 |
AS $$ |
|
2432 |
-- ensure that drop_column() only cascades to views |
|
2433 |
SELECT util.drop_constraint(col); |
|
2434 |
|
|
2435 |
SELECT util.drop_column(col); |
|
2436 |
$$; |
|
2437 |
|
|
2438 |
|
|
2439 |
-- |
|
2440 |
-- Name: FUNCTION drop_derived_col(col col, force boolean); Type: COMMENT; Schema: util; Owner: - |
|
2441 |
-- |
|
2442 |
|
|
2443 |
COMMENT ON FUNCTION drop_derived_col(col col, force boolean) IS ' |
|
2444 |
idempotent |
|
2445 |
'; |
|
2446 |
|
|
2447 |
|
|
2448 |
-- |
|
2426 | 2449 |
-- Name: drop_relation(anyelement, boolean); Type: FUNCTION; Schema: util; Owner: - |
2427 | 2450 |
-- |
2428 | 2451 |
|
Also available in: Unified diff
schemas/util.sql: added drop_derived_col(), which ensures that drop_column() only cascades to views