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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: korryd(at)enterprisedb(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Scanner/Parser question - what does _P imply?
Date: 2007-01-18 15:35:08
Message-ID: 27181.1169134508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Huxton 2007-01-18 15:57:09 Re: Temparary disable constraint
Previous Message Adnan DURSUN 2007-01-18 15:20:29 Re: Temparary disable constraint