From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Remove internal uses of CTimeZone/HasCTZSet. |
Date: | 2013-11-01 16:51:34 |
Message-ID: | E1VcHwc-0007xP-W8@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Remove internal uses of CTimeZone/HasCTZSet.
The only remaining places where we actually look at CTimeZone/HasCTZSet
are abstime2tm() and timestamp2tm(). Now that session_timezone is always
valid, we can remove these special cases. The caller-visible impact of
this is that these functions now always return a valid zone abbreviation
if requested, whereas before they'd return a NULL pointer if a brute-force
timezone was in use. In the existing code, the only place I can find that
changes behavior is to_char(), whose TZ format code will now print
something useful rather than nothing for such zones. (In the places where
the returned zone abbreviation is passed to EncodeDateTime, the lack of
visible change is because we've chosen the abbreviation used for these
zones to match what EncodeTimezone would have printed.)
It's likely that there is now a fair amount of removable dead code around
the call sites, namely anything that's meant to cope with getting a NULL
timezone abbreviation, but I've not made an effort to root that out.
This could be back-patched if we decide we'd like to fix to_char()'s
behavior in the back branches, but there doesn't seem to be much
enthusiasm for that at present.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/1c8a7f617fd1d38cb0540266e4fca6835f61005a
Modified Files
--------------
src/backend/utils/adt/nabstime.c | 26 +---------------------
src/backend/utils/adt/timestamp.c | 37 +++++---------------------------
src/test/regress/expected/horology.out | 6 +++---
3 files changed, 9 insertions(+), 60 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-11-01 17:57:42 | pgsql: Remove CTimeZone/HasCTZSet, root and branch. |
Previous Message | Tom Lane | 2013-11-01 16:14:17 | pgsql: Fix some odd behaviors when using a SQL-style simple GMT offset |
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2013-11-01 18:13:49 | Re: Save Hash Indexes |
Previous Message | Marti Raudsepp | 2013-11-01 16:48:13 | Re: PostgreSQL 9.3 beta breaks some extensions "make install" |