Re: Selecting all variations of job title in a list - Mailing list pgsql-general

From Rich Shepard
Subject Re: Selecting all variations of job title in a list
Date
Msg-id 29ffee7e-40a8-f911-4419-24ba8558f5db@appl-ecosys.com
Whole thread Raw
In response to Re: Selecting all variations of job title in a list  (Vincent Veyron <vv.lists@wanadoo.fr>)
Responses Re: Selecting all variations of job title in a list
Re: Selecting all variations of job title in a list
List 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



pgsql-general by date:

Previous
From: Vincent Veyron
Date:
Subject: Re: Selecting all variations of job title in a list
Next
From: Laurenz Albe
Date:
Subject: Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key