Re: Function structure in formatting.c
От | Brendan Jurd |
---|---|
Тема | Re: Function structure in formatting.c |
Дата | |
Msg-id | 37ed240d0708081943w607a96e9y71f891de12f7c1e3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Function structure in formatting.c ("Brendan Jurd" <direvus@gmail.com>) |
Ответы |
Re: Function structure in formatting.c
|
Список | pgsql-hackers |
Just quick update on this. It turns out (as it always does) that I want to refactor a bit more intensively than I first suggested. The functions dch_global, dch_time and dch_date seem to be wholly pointless, since dch_global is effectively a one-liner for the FX flag, and the other two merely wrap around a giant switch statement. My thought was to split DCH_processor into a to_char flavour and a from_char flavour, and have those functions do all the work; loop through each of the FormatNodes and run the giant switch statement. This means there is no need to put pointers to "action functions" in each of the KeyWords. It makes the code simpler, more readable -- and considerably shorter. A patch will be on the way shortly.
В списке pgsql-hackers по дате отправления: