From: Jan Wieck <JanWieck@Yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: korryd@enterprisedb.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Scanner/Parser question - what does _P imply?
Date: Thu, 25 Jan 2007 14:38:03 -0500
Message-ID: <45B9071B.9060806@Yahoo.com> (raw)
In-Reply-To: <27181.1169134508@sss.pgh.pa.us>
References: <1169115899.2805.66.camel@sakai.localdomain>
<27181.1169134508@sss.pgh.pa.us>
On 1/18/2007 10:35 AM, Tom Lane wrote:
> <korryd@enterprisedb.com> writes:
>> Many of the keywords listed in keywords.c are defined with symbolic
>> names that end in '_P' (underscore P).
>> What differentiates those keywords from the other keywords? What does
>> the 'P' stand for?
>
> P = Parser. The reason for the _P is just to avoid conflicts with
> other definitions of the macro name, either in our own code or various
> platforms' header files. We haven't been totally consistent about it,
> but roughly speaking we've stuck _P on when it was either known or
> seemed likely that there might be a conflict.
>
> Some years ago there was discussion of consistently P-ifying *all* those
> macros, but it didn't get done; I think Thomas or somebody objected that
> it would make gram.y needlessly harder to read.
Are there many people who read gram.y on a regular base?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: JanWieck@Yahoo.com, tgl@sss.pgh.pa.us, korryd@enterprisedb.com
Subject: Re: Scanner/Parser question - what does _P imply?
In-Reply-To: <45B9071B.9060806@Yahoo.com>
* 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