Project

General

Profile

« Previous | Next » 

Revision 14356

schemas/util.sql: remove_prefix(), remove_suffix(): support case-insensitive matching

View differences:

trunk/inputs/.TNRS/schema.sql
93 93

  
94 94

  
95 95
--
96
-- Name: remove_prefix(text, text, boolean); Type: FUNCTION; Schema: TNRS; Owner: -
96
-- Name: remove_prefix(text, text, boolean, boolean); Type: FUNCTION; Schema: TNRS; Owner: -
97 97
--
98 98

  
99
CREATE FUNCTION remove_prefix(prefix text, str text, require boolean DEFAULT true) RETURNS text
99
CREATE FUNCTION remove_prefix(prefix text, str text, require boolean DEFAULT true, case_sensitive boolean DEFAULT true) RETURNS text
100 100
    LANGUAGE sql IMMUTABLE
101 101
    AS $$
102 102
SELECT util.remove_prefix(prefix, str, require)
......
104 104

  
105 105

  
106 106
--
107
-- Name: FUNCTION remove_prefix(prefix text, str text, require boolean); Type: COMMENT; Schema: TNRS; Owner: -
107
-- Name: FUNCTION remove_prefix(prefix text, str text, require boolean, case_sensitive boolean); Type: COMMENT; Schema: TNRS; Owner: -
108 108
--
109 109

  
110
COMMENT ON FUNCTION remove_prefix(prefix text, str text, require boolean) IS '
110
COMMENT ON FUNCTION remove_prefix(prefix text, str text, require boolean, case_sensitive boolean) IS '
111 111
wrapper that prevents views from getting dropped when the util schema is reinstalled
112 112
';
113 113

  
trunk/schemas/vegbien.my.sql
15806 15806

  
15807 15807

  
15808 15808
--
15809
-- Name: remove_prefix(varchar(255), varchar(255), int(1)); Type: FUNCTION; Schema: TNRS; Owner: -
15809
-- Name: remove_prefix(varchar(255), varchar(255), int(1), int(1)); Type: FUNCTION; Schema: TNRS; Owner: -
15810 15810
--
15811 15811

  
15812 15812

  
15813 15813

  
15814 15814

  
15815 15815
--
15816
-- Name: FUNCTION remove_prefix(prefix varchar(255), str varchar(255), require int(1)); Type: COMMENT; Schema: TNRS; Owner: -
15816
-- Name: FUNCTION remove_prefix(prefix varchar(255), str varchar(255), require int(1), case_sensitive int(1)); Type: COMMENT; Schema: TNRS; Owner: -
15817 15817
--
15818 15818

  
15819 15819

  
trunk/schemas/vegbien.sql
19712 19712

  
19713 19713

  
19714 19714
--
19715
-- Name: remove_prefix(text, text, boolean); Type: FUNCTION; Schema: TNRS; Owner: -
19715
-- Name: remove_prefix(text, text, boolean, boolean); Type: FUNCTION; Schema: TNRS; Owner: -
19716 19716
--
19717 19717

  
19718
CREATE FUNCTION remove_prefix(prefix text, str text, require boolean DEFAULT true) RETURNS text
19718
CREATE FUNCTION remove_prefix(prefix text, str text, require boolean DEFAULT true, case_sensitive boolean DEFAULT true) RETURNS text
19719 19719
    LANGUAGE sql IMMUTABLE
19720 19720
    AS $$
19721 19721
SELECT util.remove_prefix(prefix, str, require)
......
19723 19723

  
19724 19724

  
19725 19725
--
19726
-- Name: FUNCTION remove_prefix(prefix text, str text, require boolean); Type: COMMENT; Schema: TNRS; Owner: -
19726
-- Name: FUNCTION remove_prefix(prefix text, str text, require boolean, case_sensitive boolean); Type: COMMENT; Schema: TNRS; Owner: -
19727 19727
--
19728 19728

  
19729
COMMENT ON FUNCTION remove_prefix(prefix text, str text, require boolean) IS '
19729
COMMENT ON FUNCTION remove_prefix(prefix text, str text, require boolean, case_sensitive boolean) IS '
19730 19730
wrapper that prevents views from getting dropped when the util schema is reinstalled
19731 19731
';
19732 19732

  

Also available in: Unified diff