On Wed, Sep 01, 2021 at 01:26:26PM -0400, John Naylor wrote:
> On Wed, Sep 1, 2021 at 5:32 AM Aleksander Alekseev <aleksan...@timescale.com>
> wrote:
> >
> > By looking at timestamptz_bin() implementation I don't see why it
> > should be STABLE. Its return value depends only on the input values.
> > It doesn't look at the session parameters. timestamptz_in() and
> > timestamptz_out() are STABLE, that's true, but this is no concern of
> > timestamptz_bin().
> 
> I'm not quite willing to bet the answer couldn't change if the timezone
> changes, but it's possible I'm the one missing something.

ts=# SET timezone='-12';
ts=# SELECT date_bin('1hour', '2021-07-01 -1200', '2021-01-01');
date_bin | 2021-07-01 00:00:00-12

ts=# SET timezone='+12';
ts=# SELECT date_bin('1hour', '2021-07-01 -1200', '2021-01-01');
date_bin | 2021-07-02 00:00:00+12

-- 
Justin


Reply via email to