Exemplo:
SELECT first_name FROM users WHERE first_name ~ '.erem.*' LIMIT 3;
first_name
-----------------
Gillian Jeremie
Jeremy
Jeremiah
(3 rows)
http://www.postgresql.org/docs/9.3/static/functions-matching.html#FUNCTIONS-POSIX-TABLE
Conteúdo para você se capacitar em programação
Exemplo:
SELECT first_name FROM users WHERE first_name ~ '.erem.*' LIMIT 3;
first_name
-----------------
Gillian Jeremie
Jeremy
Jeremiah
(3 rows)
http://www.postgresql.org/docs/9.3/static/functions-matching.html#FUNCTIONS-POSIX-TABLE