public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Selecting all variations of job title in a list
6+ messages / 5 participants
[nested] [flat]

* Re: Selecting all variations of job title in a list
@ 2025-11-26 15:43 Vincent Veyron <[email protected]>
  2025-11-26 15:52 ` Re: Selecting all variations of job title in a list David G. Johnston <[email protected]>
  2025-11-26 16:08 ` Re: Selecting all variations of job title in a list Rich Shepard <[email protected]>
  0 siblings, 2 replies; 6+ messages in thread

From: Vincent Veyron @ 2025-11-26 15:43 UTC (permalink / raw)
  To: Rich Shepard <[email protected]>; +Cc: [email protected]

On Wed, 26 Nov 2025 07:10:16 -0800 (PST)
Rich Shepard <[email protected]> wrote:

> 
> Learning postgres regexp is at the top of my list.
> 

https://perldoc.perl.org/perlre

Read the first few pages and you'll be good to go.


-- 
					Bien à vous, Vincent Veyron 

https://marica.fr/ 
Logiciel de suivi des contentieux juridiques, des sinistres d'assurance et des contrats






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Selecting all variations of job title in a list
  2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
@ 2025-11-26 15:52 ` David G. Johnston <[email protected]>
  2025-11-26 16:10   ` Re: Selecting all variations of job title in a list Rich Shepard <[email protected]>
  1 sibling, 1 reply; 6+ messages in thread

From: David G. Johnston @ 2025-11-26 15:52 UTC (permalink / raw)
  To: Vincent Veyron <[email protected]>; +Cc: Rich Shepard <[email protected]>; [email protected] <[email protected]>

On Wednesday, November 26, 2025, Vincent Veyron <[email protected]> wrote:

> On Wed, 26 Nov 2025 07:10:16 -0800 (PST)
> Rich Shepard <[email protected]> wrote:
>
> >
> > Learning postgres regexp is at the top of my list.
> >
>
> https://perldoc.perl.org/perlre
>
> Read the first few pages and you'll be good to go.
>

I was using this tool a while back when I was doing heavy regex work.

https://www.regexbuddy.com/

Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl.

But I’d still say regexp is not the best solution here - unless you
encapsulate the logic in a function.  I suspect you’ll want to use this
logic in more than just a single query and with a literal regexp you have
to rely on manual synchronization.  Note, you could combine the lookup
table with regexes.  Though beware of ensure you don’t produce duplicate
matches if you go that route.

David J.


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Selecting all variations of job title in a list
  2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
  2025-11-26 15:52 ` Re: Selecting all variations of job title in a list David G. Johnston <[email protected]>
@ 2025-11-26 16:10   ` Rich Shepard <[email protected]>
  2025-11-26 17:01     ` Re: Selecting all variations of job title in a list Bryan Sayer <[email protected]>
  0 siblings, 1 reply; 6+ messages in thread

From: Rich Shepard @ 2025-11-26 16:10 UTC (permalink / raw)
  To: ; +Cc: [email protected] <[email protected]>

On Wed, 26 Nov 2025, David G. Johnston wrote:

> I was using this tool a while back when I was doing heavy regex work.
>
> https://www.regexbuddy.com/
>
> Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl.
>
> But I’d still say regexp is not the best solution here - unless you
> encapsulate the logic in a function.  I suspect you’ll want to use this
> logic in more than just a single query and with a literal regexp you have
> to rely on manual synchronization.  Note, you could combine the lookup
> table with regexes.  Though beware of ensure you don’t produce duplicate
> matches if you go that route.

David,

Thanks,

Rich






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Selecting all variations of job title in a list
  2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
  2025-11-26 15:52 ` Re: Selecting all variations of job title in a list David G. Johnston <[email protected]>
  2025-11-26 16:10   ` Re: Selecting all variations of job title in a list Rich Shepard <[email protected]>
@ 2025-11-26 17:01     ` Bryan Sayer <[email protected]>
  2025-11-28 10:19       ` Re: Selecting all variations of job title in a list Jacqui Caren <[email protected]>
  0 siblings, 1 reply; 6+ messages in thread

From: Bryan Sayer @ 2025-11-26 17:01 UTC (permalink / raw)
  To: [email protected]

I am not very skilled at Postgresql specifically, but when I was doing 
SQL in another environment I would just do

select distinct (or unique) jobtitle

usually getting a count of how many times each title occurred. Then I 
would create a mapping to standardize the the job titles.

*Bryan Sayer*
Retired Demographer/Statistician
/In a world in which you can be anything, *be kind*/
On 11/26/2025 11:10 AM, Rich Shepard wrote:
> On Wed, 26 Nov 2025, David G. Johnston wrote:
>
>> I was using this tool a while back when I was doing heavy regex work.
>>
>> https://www.regexbuddy.com/
>>
>> Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl.
>>
>> But I’d still say regexp is not the best solution here - unless you
>> encapsulate the logic in a function.  I suspect you’ll want to use this
>> logic in more than just a single query and with a literal regexp you 
>> have
>> to rely on manual synchronization.  Note, you could combine the lookup
>> table with regexes.  Though beware of ensure you don’t produce duplicate
>> matches if you go that route.
>
> David,
>
> Thanks,
>
> Rich
>
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Selecting all variations of job title in a list
  2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
  2025-11-26 15:52 ` Re: Selecting all variations of job title in a list David G. Johnston <[email protected]>
  2025-11-26 16:10   ` Re: Selecting all variations of job title in a list Rich Shepard <[email protected]>
  2025-11-26 17:01     ` Re: Selecting all variations of job title in a list Bryan Sayer <[email protected]>
@ 2025-11-28 10:19       ` Jacqui Caren <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Jacqui Caren @ 2025-11-28 10:19 UTC (permalink / raw)
  To: Bryan Sayer <[email protected]>; +Cc: [email protected]

Many years ago I used a weak precedence engine to categorize this form of
job title script to a job code.

The regexp did not work because we had asst to gen mgr
The wpe tokenized the words then relaxed token patterns with other token
codes with cumulative context
The final token reduction resulted in a final code or if in my example we
had a modifier to role code (asst to xxxx role)

The entire engine was created in Oracle but would be easy to implement in
pgsql. Back then neural nets were only just appearing in finance and llms
were non existent.

Old 1960's tech saved the day

On Wed, Nov 26, 2025, 17:02 Bryan Sayer <[email protected]> wrote:

> I am not very skilled at Postgresql specifically, but when I was doing SQL
> in another environment I would just do
>
> select distinct (or unique) jobtitle
>
> usually getting a count of how many times each title occurred. Then I
> would create a mapping to standardize the the job titles.
> *Bryan Sayer*
> Retired Demographer/Statistician
> *In a world in which you can be anything, be kind*
> On 11/26/2025 11:10 AM, Rich Shepard wrote:
>
> On Wed, 26 Nov 2025, David G. Johnston wrote:
>
> I was using this tool a while back when I was doing heavy regex work.
>
> https://www.regexbuddy.com/
>
> Keep in mind the native flavor of regex in PostgreSQL is TCL, not Perl.
>
> But I’d still say regexp is not the best solution here - unless you
> encapsulate the logic in a function.  I suspect you’ll want to use this
> logic in more than just a single query and with a literal regexp you have
> to rely on manual synchronization.  Note, you could combine the lookup
> table with regexes.  Though beware of ensure you don’t produce duplicate
> matches if you go that route.
>
>
> David,
>
> Thanks,
>
> Rich
>
>
>


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Selecting all variations of job title in a list
  2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
@ 2025-11-26 16:08 ` Rich Shepard <[email protected]>
  1 sibling, 0 replies; 6+ messages in thread

From: Rich Shepard @ 2025-11-26 16:08 UTC (permalink / raw)
  To: [email protected]

On Wed, 26 Nov 2025, Vincent Veyron wrote:

> https://perldoc.perl.org/perlre
> Read the first few pages and you'll be good to go.

Thanks, Vincent.

Rich






^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-11-28 10:19 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-26 15:43 Re: Selecting all variations of job title in a list Vincent Veyron <[email protected]>
2025-11-26 15:52 ` David G. Johnston <[email protected]>
2025-11-26 16:10   ` Rich Shepard <[email protected]>
2025-11-26 17:01     ` Bryan Sayer <[email protected]>
2025-11-28 10:19       ` Jacqui Caren <[email protected]>
2025-11-26 16:08 ` Rich Shepard <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox