Thread: Using system time zone database
Because there seems to be an increasing trend among packagers to drop the PostgreSQL-supplied time zone data and use the operating system's instead, I figured it would be good to define an official and documented way to do this. If we could get, say, the Linux, BSD, and Solaris packagers to adopt this, this would eliminate the bulk of essentially redundant efforts to upgrade the PostgreSQL packages whenever the time zone data changes. Here is a proposed patch that you would use like this: ./configure ... --with-system-tzdata=/usr/share/zoneinfo I'm not sure to what extent the regression tests exercise the specifics of the time zone data, but when you specify something totally wrong some tests fail, so it would be easy to catch that. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Attachment
Peter Eisentraut wrote: > Because there seems to be an increasing trend among packagers to drop the > PostgreSQL-supplied time zone data and use the operating system's instead, Because it seems government in many countries make a decision to make live harder. :( > I figured it would be good to define an official and documented way to do this. > If we could get, say, the Linux, BSD, and Solaris packagers to adopt this, Yes, e.g. Solaris use this solution for 8.2 packages. I sent little bit different patch few months ago. You can see discussion there: http://archives.postgresql.org/pgsql-patches/2007-03/msg00293.php Your solution correlate with conclusion of this thread. > this would eliminate the bulk of essentially redundant efforts to upgrade the > PostgreSQL packages whenever the time zone data changes. > Yes, I agree. > Here is a proposed patch that you would use like this: I'm not sure if configure is necessary to modify (is not generate from configure.in during commit process)? Also could be good to modify also pg_config to show where TZ files are stored. Zdenek
On Fri, Aug 17, 2007 at 11:24:11AM +0200, Peter Eisentraut wrote: > Because there seems to be an increasing trend among packagers to drop the > PostgreSQL-supplied time zone data and use the operating system's instead, I > figured it would be good to define an official and documented way to do this. > If we could get, say, the Linux, BSD, and Solaris packagers to adopt this, > this would eliminate the bulk of essentially redundant efforts to upgrade the > PostgreSQL packages whenever the time zone data changes. > > Here is a proposed patch that you would use like this: > > ./configure ... --with-system-tzdata=/usr/share/zoneinfo > > I'm not sure to what extent the regression tests exercise the specifics of the > time zone data, but when you specify something totally wrong some tests fail, > so it would be easy to catch that. Could there be some way for configure to automatically check that the timezone format used on the system is in fact compatible? Such as checking if it can load a well-known timezone and that it behaves properly? //Magnus
Am Freitag, 17. August 2007 13:03 schrieb Magnus Hagander: > Could there be some way for configure to automatically check that the > timezone format used on the system is in fact compatible? Such as checking > if it can load a well-known timezone and that it behaves properly? You cannot assume that the build environment is the same as the run environment. Anyway, just run make check and you will know. Anything else would be much too complicated. This patch just provides direct access to the process that people already use anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Am Freitag, 17. August 2007 12:46 schrieb Zdenek Kotala: > Yes, e.g. Solaris use this solution for 8.2 packages. I sent little bit > different patch few months ago. You can see discussion there: Yes, my patch just uses the symlink solution that people already use. > Also could be good to modify also > pg_config to show where TZ files are stored. pg_config --configure would show it. -- Peter Eisentraut http://developer.postgresql.org/~petere/