public inbox for [email protected]  
help / color / mirror / Atom feed
From: Anatolii Smolianinov <[email protected]>
To: [email protected]
Subject: Timezone: resolve $TZDIR in runtime
Date: Mon, 21 Oct 2024 12:01:19 +0200
Message-ID: <CABvPt_xtYyvFfyupGn=TXNGnEAFd0m_ARPFpDUWBcn603aM84w@mail.gmail.com> (raw)

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!


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Timezone: resolve $TZDIR in runtime
  In-Reply-To: <CABvPt_xtYyvFfyupGn=TXNGnEAFd0m_ARPFpDUWBcn603aM84w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox