From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Fixing MSVC's inability to detect elog(ERROR) does not return
Date: Wed, 17 Sep 2025 00:45:49 -0400
Message-ID: <1443736.1758084349@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvr71WXZgLYPLNC0zUsNufYhBer4rYiHQF_-jQ4iDKBRsg@mail.gmail.com>
References: <CAApHDvom02B_XNVSkvxznVUyZbjGAR+5myA89ZcbEd3=PA9UcA@mail.gmail.com>
<d38be90a-3e7a-42e0-a844-a7a122392c7e@eisentraut.org>
<CAApHDvpZyaTcyjrQ0cYxusJe6M=6QrmfZHue=Q1=7+ZpWymHHA@mail.gmail.com>
<a92097fa-a7e3-406b-a160-4988e690c6ca@eisentraut.org>
<CAApHDvojMx2YEemTp8qVD6VCQkJN6PSW_naFrSVZTyeSGtYbNg@mail.gmail.com>
<1438905.1758081776@sss.pgh.pa.us>
<CAApHDvr71WXZgLYPLNC0zUsNufYhBer4rYiHQF_-jQ4iDKBRsg@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 17 Sept 2025 at 16:03, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It absolutely stands for "predicate". That's an ancient Lisp-ism.
> Thanks for the confirmation. I'm happy enough to leave the _p in
> there, but at the same time, I don't see the particular reason to
> follow some ancient Lisp rule.
I'm just saying that that's surely where the gcc crew got it from.
I do agree with Peter that we should follow that convention within
the narrow realm of compiler intrinsics; but I'm not arguing for
running around and renaming random PG functions to something_p.
As long as we're delving into weeds: we have another project
convention for "_P", which is terminal symbols in our grammar such
as NULL_P. Clearly, that "P" is not for "predicate"; I suppose it
should be read as "parse" or "parser". Given that large parts of
original POSTGRES were written in Lisp, it's a tad hard to believe
that whoever chose those names had not heard of the "predicate"
convention. I guess he/she figured that it didn't matter because
there'd be very little overlap or scope for confusion, and that
seems to have been borne out over time.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, peter@eisentraut.org
Subject: Re: Fixing MSVC's inability to detect elog(ERROR) does not return
In-Reply-To: <1443736.1758084349@sss.pgh.pa.us>
References: <CAApHDvom02B_XNVSkvxznVUyZbjGAR+5myA89ZcbEd3=PA9UcA@mail.gmail.com> <d38be90a-3e7a-42e0-a844-a7a122392c7e@eisentraut.org> <CAApHDvpZyaTcyjrQ0cYxusJe6M=6QrmfZHue=Q1=7+ZpWymHHA@mail.gmail.com> <a92097fa-a7e3-406b-a160-4988e690c6ca@eisentraut.org> <CAApHDvojMx2YEemTp8qVD6VCQkJN6PSW_naFrSVZTyeSGtYbNg@mail.gmail.com> <1438905.1758081776@sss.pgh.pa.us> <CAApHDvr71WXZgLYPLNC0zUsNufYhBer4rYiHQF_-jQ4iDKBRsg@mail.gmail.com> <1443736.1758084349@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox