Project

General

Profile

« Previous | Next » 

Revision 12333

schemas/util.sql: added regexp_quote()

View differences:

util.sql
2220 2220

  
2221 2221

  
2222 2222
--
2223
-- Name: regexp_quote(text); Type: FUNCTION; Schema: util; Owner: -
2224
--
2225

  
2226
CREATE FUNCTION regexp_quote(str text) RETURNS text
2227
    LANGUAGE sql IMMUTABLE
2228
    AS $_$
2229
SELECT regexp_replace($1, '\W', /*\char*/'\\\&', 'g')
2230
$_$;
2231

  
2232

  
2233
--
2223 2234
-- Name: remake_diff_table(text, regclass, regclass, text); Type: FUNCTION; Schema: util; Owner: -
2224 2235
--
2225 2236

  

Also available in: Unified diff