Re: Support TZ format code in to_timestamp()
От | Tom Lane |
---|---|
Тема | Re: Support TZ format code in to_timestamp() |
Дата | |
Msg-id | 3744549.1705940714@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Support TZ format code in to_timestamp() (Daniel Gustafsson <daniel@yesql.se>) |
Список | pgsql-hackers |
Daniel Gustafsson <daniel@yesql.se> writes: > On 22 Jan 2024, at 03:10, Tom Lane <tgl@sss.pgh.pa.us> wrote: > + while (len > 0) > + { > + const datetkn *tp = datebsearch(lowtoken, zoneabbrevtbl->abbrevs, > + zoneabbrevtbl->numabbrevs); > My immediate reaction was that we should stop at prefix lengths of two since I > could only think of abbreviations of two or more. Googling and reading found > that there are indeed one-letter timezones (Alpha, Bravo etc..). Not sure if > it's worth mentioning that in the comment to help other readers who aren't neck > deep in timezones? The one I usually think of is "Z" for UTC; I wasn't actually aware that there were any other single-letter abbrevs. But in any case I don't see a reason for this code to be making such assumptions. > + /* FALL THRU */ > Tiny nitpick, it looks a bit curious that we spell it FALL THRU here and "fall > through" a few cases up in the same switch. While we are quite inconsistent > across the tree, consistency within a file is preferrable (regardless of > which). Fair. I tend to shorten it, but I failed to notice that there was nearby precedent for the other way. regards, tom lane
В списке pgsql-hackers по дате отправления: