By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
WITH t(t) AS
(
VALUES
('Good morning ASCII!'),
('Com estàs?'),
('Доброе утро!'),
('ありがとう'),
('صباح الخير'),
('Καλημέρα σας'),
('A sentence with a non-breakable space')
)
SELECT
t, regexp_replace(t, '([^[:ascii:]])', '[\1]', 'g') AS t_marked
FROM
t
WHERE
t ~ '[^[:ascii:]]';
t | t_marked |
---|---|
Com estàs? | Com est[à]s? |
Доброе утро! | [Д][о][б][р][о][е] [у][т][р][о]! |
ありがとう | [あ][り][が][と][う] |
صباح الخير | [ص][ب][ا][ح] [ا][ل][خ][ي][ر] |
Καλημέρα σας | [Κ][α][λ][η][μ][έ][ρ][α] [σ][α][ς] |
A sentence with a non-breakable space | A sentence with a[ ]non-breakable space |