mirror of https://github.com/postgres/postgres
Emre Hasegeli Patch: <CAE2gYzzF24ZHWqkMukkHwqa0otbES9Rex22LrjQUNbi=oKziNQ@mail.gmail.com>pull/31/head
parent
9f31e45a6d
commit
f9d747a4e9
@ -0,0 +1,12 @@ |
|||||||
|
/* contrib/citext/citext--1.3--1.4.sql */ |
||||||
|
|
||||||
|
-- complain if script is sourced in psql, rather than via ALTER EXTENSION |
||||||
|
\echo Use "ALTER EXTENSION citext UPDATE TO '1.4'" to load this file. \quit |
||||||
|
|
||||||
|
CREATE FUNCTION regexp_match( citext, citext ) RETURNS TEXT[] AS $$ |
||||||
|
SELECT pg_catalog.regexp_match( $1::pg_catalog.text, $2::pg_catalog.text, 'i' ); |
||||||
|
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
||||||
|
|
||||||
|
CREATE FUNCTION regexp_match( citext, citext, text ) RETURNS TEXT[] AS $$ |
||||||
|
SELECT pg_catalog.regexp_match( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END ); |
||||||
|
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
||||||
@ -1,5 +1,5 @@ |
|||||||
# citext extension |
# citext extension |
||||||
comment = 'data type for case-insensitive character strings' |
comment = 'data type for case-insensitive character strings' |
||||||
default_version = '1.3' |
default_version = '1.4' |
||||||
module_pathname = '$libdir/citext' |
module_pathname = '$libdir/citext' |
||||||
relocatable = true |
relocatable = true |
||||||
|
|||||||
Loading…
Reference in new issue