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
('A fully ASCII text!'),
('Have you heard of Saint Death? Don’t pray to her.'),
('China’s marriage rate is plummeting because women are choosing autonomy over ')
)
SELECT
regexp_replace(t, '([^[:ascii:]])', '[\1]', 'g') AS t_marked
FROM
t
WHERE
t ~ '[^[:ascii:]]' ;
t_marked |
---|
Have you heard of Saint Death? Don[’]t pray to her. |
China[’]s marriage rate is plummeting because women are choosing autonomy over |
SELECT 2