Re: Small changes to facilitate Win32 port

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Katherine Ward" <kward6(at)yahoo(dot)com>, Thomas Lockhart <lockhart(at)fourpalms(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small changes to facilitate Win32 port
Date: 2002-05-30 22:25:03
Message-ID: 8218.1022797503@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> It's more likely that your changes will go through if you just submit a
> patch!

I think the question was more directed at "do we like these names?",
which should certainly be asked before going to the trouble of making a
patch.

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

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

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-05-30 22:31:45 Re: finding medians
Previous Message Christopher Kings-Lynne 2002-05-30 22:06:44 Re: Small changes to facilitate Win32 port