mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-03 04:26:52 +02:00
e1c1d5444e
This has required an update of the python script generating the rules, as its format has changed in release 29. This release has also added new punctuation and symbols, and a new set of rules has been generated to include them. The way to find newest versions of Latin-ASCII gets also more clearly documented. Author: Hugh Ranalli, Michael Paquier Discussion: https://postgr.es/m/15548-cef1b3f8de190d4f@postgresql.org
82 lines
1.1 KiB
Plaintext
82 lines
1.1 KiB
Plaintext
CREATE EXTENSION unaccent;
|
|
-- must have a UTF8 database
|
|
SELECT getdatabaseencoding();
|
|
getdatabaseencoding
|
|
---------------------
|
|
UTF8
|
|
(1 row)
|
|
|
|
SET client_encoding TO 'UTF8';
|
|
SELECT unaccent('foobar');
|
|
unaccent
|
|
----------
|
|
foobar
|
|
(1 row)
|
|
|
|
SELECT unaccent('ёлка');
|
|
unaccent
|
|
----------
|
|
елка
|
|
(1 row)
|
|
|
|
SELECT unaccent('ЁЖИК');
|
|
unaccent
|
|
----------
|
|
ЕЖИК
|
|
(1 row)
|
|
|
|
SELECT unaccent('˃˖˗˜');
|
|
unaccent
|
|
----------
|
|
>+-~
|
|
(1 row)
|
|
|
|
SELECT unaccent('unaccent', 'foobar');
|
|
unaccent
|
|
----------
|
|
foobar
|
|
(1 row)
|
|
|
|
SELECT unaccent('unaccent', 'ёлка');
|
|
unaccent
|
|
----------
|
|
елка
|
|
(1 row)
|
|
|
|
SELECT unaccent('unaccent', 'ЁЖИК');
|
|
unaccent
|
|
----------
|
|
ЕЖИК
|
|
(1 row)
|
|
|
|
SELECT unaccent('unaccent', '˃˖˗˜');
|
|
unaccent
|
|
----------
|
|
>+-~
|
|
(1 row)
|
|
|
|
SELECT ts_lexize('unaccent', 'foobar');
|
|
ts_lexize
|
|
-----------
|
|
|
|
(1 row)
|
|
|
|
SELECT ts_lexize('unaccent', 'ёлка');
|
|
ts_lexize
|
|
-----------
|
|
{елка}
|
|
(1 row)
|
|
|
|
SELECT ts_lexize('unaccent', 'ЁЖИК');
|
|
ts_lexize
|
|
-----------
|
|
{ЕЖИК}
|
|
(1 row)
|
|
|
|
SELECT ts_lexize('unaccent', '˃˖˗˜');
|
|
ts_lexize
|
|
-----------
|
|
{>+-~}
|
|
(1 row)
|
|
|