egrep is obsolescent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: egrep is obsolescent
Date: 2026-05-13 15:24:30
Message-ID: 473272.1778685870@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While running pgperltidy just now on my recently-updated
Linux workstation, I got

$ src/tools/pgindent/pgperltidy .
egrep: warning: egrep is obsolescent; using grep -E

OK, that's a bit in-your-face, but it's not inaccurate.
AFAICT, "egrep" has never been in POSIX, while "grep -E"
has been there at least since POSIX 2008.

So I propose the attached patch, which is just s/egrep/grep -E/g.

I did not touch the two usages in port/aix/mkldexport.sh, though.
I'm not sure what the standardization situation is in AIX, and
this warning doesn't seem like something they'd do anyway.

There is also a reference in configure, which is not a problem
because it tries "grep -E" first.

regards, tom lane

Attachment Content-Type Size
use-grep-E-not-egrep.patch text/x-diff 2.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-05-13 15:28:42 Re: Vacuumlo improvements
Previous Message jian he 2026-05-13 15:15:31 Re: Is there value in having optimizer stats for joins/foreignkeys?