Revision 10856
Added by Aaron Marcuse-Kubitza about 11 years ago
vegbien.sql | ||
---|---|---|
720 | 720 |
|
721 | 721 |
|
722 | 722 |
-- |
723 |
-- Name: datasource_rename(text, text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
|
724 |
-- |
|
725 |
|
|
726 |
CREATE FUNCTION datasource_rename(old text, new text, schema_null anyelement DEFAULT NULL::source) RETURNS void |
|
727 |
LANGUAGE sql |
|
728 |
AS $_$ |
|
729 |
SELECT set_config('search_path', util.schema_ident($3), true); |
|
730 |
UPDATE source SET shortname = $2 WHERE shortname = $1; |
|
731 |
$_$; |
|
732 |
|
|
733 |
|
|
734 |
-- |
|
735 |
-- Name: FUNCTION datasource_rename(old text, new text, schema_null anyelement); Type: COMMENT; Schema: public; Owner: - |
|
736 |
-- |
|
737 |
|
|
738 |
COMMENT ON FUNCTION datasource_rename(old text, new text, schema_null anyelement) IS 'secure against renamings of the public schema. |
|
739 |
|
|
740 |
schema_null: identifies which schema''s tables to use. the default value is usually fine. |
|
741 |
'; |
|
742 |
|
|
743 |
|
|
744 |
-- |
|
723 | 745 |
-- Name: datasource_rm(text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
724 | 746 |
-- |
725 | 747 |
|
Also available in: Unified diff
schemas/vegbien.sql: added datasource_rename()