From: | Anatolii Smolianinov <zarkonesmall(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Timezone: resolve $TZDIR in runtime |
Date: | 2024-10-21 10:01:19 |
Message-ID: | CABvPt_xtYyvFfyupGn=TXNGnEAFd0m_ARPFpDUWBcn603aM84w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I was recently working with a project which embeds postgres into
application. It uses binaries built for Debian, and configured to look for
timezones in Debian's timezone folder /usr/share/zoneinfo/, which wasn't
present on my system.
I was thinking if it's possible to redefine it in runtime, and found that
it is not possible: postgres support either compilation flag
--with-system-tzdata or built-in tz file -- timezone/data/tzdata.zi. From
the other hand, looking at src/timezone/pgtz.c#L54, it seems that timezone
dir resolve happens in runtime, which means, it is possible to use $TZDIR
environment variable or configuration option to achieve this without
recompilation.
Do you think it is a feasible thing to do? it would be very convenient for
portable postgers builds.
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Sunil Kumar | 2024-10-21 11:06:06 | PostgreSQL Database Community Edition -- Please provide list of the supported hypervisors |
Previous Message | user | 2024-10-21 08:40:12 | Fwd: Postgres attach partition: AccessExclusive lock set on different tables depending on how attaching is performed |