Answer the question
In order to leave comments, you need to log in
How to make a selection of records in Postgres that consist only of Russian letters or English?
Actually the subject, tried hard to google, but did not find anything. Only records with Russian letters or only with English letters are needed. How to be?
Answer the question
In order to leave comments, you need to log in
This can be solved with regular expressions:
#Ищем пользователей с именем, написанным только латинскими буквами
SELECT * FROM users WHERE name ~ '[a-z]+';
#ищем с русскими буквами
SELECT * FROM users WHERE name ~ '[а-я]+';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question