Re: Australian timezone configure option
От | Tom Lane |
---|---|
Тема | Re: Australian timezone configure option |
Дата | |
Msg-id | 7941.992328923@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Australian timezone configure option (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Australian timezone configure option
|
Список | pgsql-patches |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > OK, this patch makes Australian_timezones a GUC option. It can be set > anytime in psql. The code uses a static variable to check if the GUC > setting has changed and adjust the C struct accordingly. This is a horrid approach. What if you get an error partway through scribbling on the static table? Then you've got inconsistent data. Nor do I much care for having to execute a check subroutine before any use of the lookup table (quite aside from speed, are you sure it's being called before *every* use of the table? how will you make sure that people remember to call it when they add new routines that use the table?). If you're going to scribble on the table, ISTM you should drive that off an assignment-hook callback from the GUC stuff. Besides which, you forgot to mark the control variable static... so it doesn't actually reflect the state of the table. It would be a lot cleaner to extend the lookup table structure so that you don't need to change the table contents to track the Aussie-rules setting. regards, tom lane
В списке pgsql-patches по дате отправления: