Re: Small changes to facilitate Win32 port

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Small changes to facilitate Win32 port
Дата
Msg-id 8218.1022797503@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Small changes to facilitate Win32 port  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: finding medians
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: finding medians