Re: Selecting all variations of job title in a list

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Selecting all variations of job title in a list
Date: 2025-11-26 15:10:16
Message-ID: 29ffee7e-40a8-f911-4419-24ba8558f5db@appl-ecosys.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-11-26 15:35:19 Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key
Previous Message Vincent Veyron 2025-11-26 14:48:44 Re: Selecting all variations of job title in a list