Re: Infinite Interval - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Infinite Interval
Date
Msg-id CAExHW5v+obHpBFCx8wDkYMRzjiHVeSGoeXXvReNQMhw--63hJA@mail.gmail.com
Whole thread Raw
In response to Re: Infinite Interval  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Fri, Sep 22, 2023 at 2:35 PM jian he <jian.universality@gmail.com> wrote:
>
> /* TODO: Handle NULL inputs? */
> since interval_avg_serialize is strict, so handle null would be like:
> if (PG_ARGISNULL(0)) then PG_RETURN_NULL();

That's automatically taken care of by the executor. Functions need to
handle NULL inputs if they are *not* strict.

#select proisstrict from pg_proc where proname = 'interval_avg_serialize';
 proisstrict
-------------
 t
(1 row)

#select proisstrict from pg_proc where proname = 'interval_avg_deserialize';
 proisstrict
-------------
 t
(1 row)


--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition
Next
From: Amit Kapila
Date:
Subject: Re: Synchronizing slots from primary to standby