mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-15 03:23:23 +02:00
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)
|
|
|