postgresql/src/timezone
Bruce Momjian aa8bdab272 Attached patch gets rid of the global timezone in the following steps:
* Changes the APIs to the timezone functions to take a pg_tz pointer as
an argument, representing the timezone to use for the selected
operation.

* Adds a global_timezone variable that represents the current timezone
in the backend as set by SET TIMEZONE (or guc, or env, etc).

* Implements a hash-table cache of loaded tables, so we don't have to
read and parse the TZ file everytime we change a timezone. While not
necesasry now (we don't change timezones very often), I beleive this
will be necessary (or at least good) when "multiple timezones in the
same query" is eventually implemented. And code-wise, this was the time
to do it.


There are no user-visible changes at this time. Implementing the
"multiple zones in one query" is a later step...

This also gets rid of some of the cruft needed to "back out a timezone
change", since we previously couldn't check a timezone unless it was
activated first.

Passes regression tests on win32, linux (slackware 10) and solaris x86.

Magnus Hagander
2005-04-19 03:13:59 +00:00
..
data Sync timezone data with latest zic database (dated Oct 11 2004). 2004-10-24 15:09:57 +00:00
ialloc.c pgindent did a pretty awful job on the timezone code, particularly with 2004-05-21 20:59:10 +00:00
localtime.c Attached patch gets rid of the global timezone in the following steps: 2005-04-19 03:13:59 +00:00
Makefile make clean must remove zic$(X) for Windows, per Magnus. 2004-12-31 19:01:54 +00:00
pgtz.c Attached patch gets rid of the global timezone in the following steps: 2005-04-19 03:13:59 +00:00
pgtz.h Attached patch gets rid of the global timezone in the following steps: 2005-04-19 03:13:59 +00:00
private.h Properly undef _(x) gettext macro. 2005-02-23 04:34:21 +00:00
README Update RELEASE_CHANGES to mention updating the timezone database as 2004-10-24 15:01:54 +00:00
scheck.c pgindent did a pretty awful job on the timezone code, particularly with 2004-05-21 20:59:10 +00:00
strftime.c Attached patch gets rid of the global timezone in the following steps: 2005-04-19 03:13:59 +00:00
tzfile.h pgindent did a pretty awful job on the timezone code, particularly with 2004-05-21 20:59:10 +00:00
zic.c Attached patch gets rid of the global timezone in the following steps: 2005-04-19 03:13:59 +00:00

This is a PostgreSQL adapted version of the timezone library
from:

	ftp://elsie.nci.nih.gov/pub/tzcode*.tar.gz

The data files under data/ are an exact copy of the latest data set
from

	ftp://elsie.nci.nih.gov/pub/tzdata*.tar.gz

Since time zone rules change frequently in some parts of the world,
we should endeavor to update the data files before each PostgreSQL
release.