Re: Scanner/Parser question - what does _P imply?

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: korryd(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Scanner/Parser question - what does _P imply?
Date: 2007-01-25 19:38:03
Message-ID: 45B9071B.9060806@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/18/2007 10:35 AM, Tom Lane wrote:
> <korryd(at)enterprisedb(dot)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(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message korryd 2007-01-25 20:34:47 Re: Scanner/Parser question - what does _P imply?
Previous Message Kostis Mentzelos 2007-01-25 19:33:43 pg_restore exclude schema from being droped option