Re: Selecting all variations of job title in a list
Rich Shepard <rshepard@appl-ecosys.com>
From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@lists.postgresql.org
Date: 2025-11-26T15:10:16Z
Lists: pgsql-general
On Wed, 26 Nov 2025, Vincent Veyron wrote: > As Ron wrote, a regexp would do it, I guess? > > SELECT * FROM people WHERE title ~ 'Asst Gen Mgr|Env Mgr|Gen Mgr|Mgr|Plant Mgr'; > > Although in your example, you would get the same result with just: > > SELECT * FROM people WHERE title ~ 'Mgr'; > > https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP Vincent, Learning postgres regexp is at the top of my list. Thanks, Rich