Skip site navigation (1) Skip section navigation (2)

Re: Small changes to facilitate Win32 port

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Katherine Ward <kward6(at)yahoo(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small changes to facilitate Win32 port
Date: 2002-05-31 13:43:09
Message-ID: 3CF77DED.202048DA@fourpalms.org (view raw or flat)
Thread:
Lists: pgsql-hackers
> >> 2.  Add _P to the following lex/yacc tokens to avoid collisions
> >> CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT
> I'm tempted to suggest that we should stick _P on *all* the lexer token
> symbols, rather than having an inconsistent set of names where some of
> them have _P and some do not.  Or perhaps _T (for token) would be a more
> sensible convention; I'm not sure why _P was used in the first place.

"P" for "Parser". The symbols are used past the lexer, but are isolated
to other places in the parser, and are (or should be) stripped out
beyond there.

> >> 3.  Rename two local macros
> >> a.  MEM_FREE => MEM_FREE_IT in backend/utils/hash/dynahash.c
> >> b.  IGNORE => IGNORE_TOK in include/utils/datetime.h &
> >> backend/utils/adt/datetime.c
> It's fairly amazing that IGNORE is the only one of the datetime.h field
> names that's bitten anyone (so far).  Macros named TZ, YEAR, MONTH, DAY,
> HOUR, MINUTE, SECOND, UNITS all look like trouble waiting to happen
> (and UNKNOWN_FIELD looks like someone already had to beat a retreat from
> calling it UNKNOWN ;-)).  I'm inclined to suggest that these names
> should be uniformly changed to DTF_FOO (DTF for "datetime field").
> The macro names appearing before the field name list look like trouble
> as well --- anyone have an interest in changing them?  Thomas, this is
> pretty much your turf; what do you think?

If the lexer/parser should have postfix qualifiers, let's use postfix
for other naming conventions too (or switch everything to prefix, but be
consistant in the conventions).

No problem with qualifying the names, though you have likely overstated
the case for it; "fairly amazing" after 6 years of use on over a dozen
platforms probably qualifies as a good test of reality and we aren't
quite to the point of having to invoke miracles and magic to explain why
it works ;)

In any case, we would certainly be open to accepting patches for the
limited number of cases Katherine has identified, and would welcome
patches which are more comprehensive if they were available.

                      - Thomas

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-05-31 15:13:28
Subject: Re: Small changes to facilitate Win32 port
Previous:From: Jan WieckDate: 2002-05-31 13:08:37
Subject: Re: Small changes to facilitate Win32 port

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group