Fix actively-misleading comments about the contents of struct pg_tm.
Tom Lane <tgl@sss.pgh.pa.us>
Fix actively-misleading comments about the contents of struct pg_tm. pgtime.h documented the PG interpretation of tm_mon right alongside the POSIX interpretation of tm_year, with no hint that neither comment was correct throughout our code. Perhaps someday we ought to switch to using two separate struct definitions to provide a clearer indication of which semantics are in use where. But I fear the tedium-versus-safety-gain tradeoff would not be very good. Discussion: https://postgr.es/m/CAJ7c6TOMG8zSNEZtCn5SPe+cCk3Lfxb71ZaQwT2F4T7PJ_t=KA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/include/pgtime.h | modified | +9 −2 |
Discussion
- Patch: shouldn't timezone(text, timestamp[tz]) be STABLE? 11 messages · 2021-08-30 → 2021-09-06