Re: Infinite Interval

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема Re: Infinite Interval
Дата
Msg-id CAAvxfHftquqVHrSZfjJkM5KTvM+m9aL8cMshWnteSoU=LPjHDQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Infinite Interval  (jian he <jian.universality@gmail.com>)
Ответы Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Список pgsql-hackers
On Thu, Jan 5, 2023 at 5:20 AM jian he <jian.universality@gmail.com> wrote:
>
>
>
> On Wed, Jan 4, 2023 at 10:13 PM jian he <jian.universality@gmail.com> wrote:
>>
>>
>>
>> I don't know how to generate an interval.out file.

Personally I just write the .out files manually. I think it especially
helps as a way to double-check that the results are what you expected.
After running make check a regressions.diff file will be generated with
all the differences between your .out file and the results of the test.


> logic combine and clean up for functions in backend/utils/adt/timestamp.c
(timestamp_pl_interval,timestamptz_pl_interval,interval_pl, interval_mi).
 

One thing I was hoping to achieve was to avoid redundant checks if
possible. For example, in the following code:
> +    if ((INTERVAL_IS_NOBEGIN(span1) && INTERVAL_IS_NOEND(span2))
> +      ||(INTERVAL_IS_NOBEGIN(span1) && !INTERVAL_NOT_FINITE(span2))
> +      ||(!INTERVAL_NOT_FINITE(span1) && INTERVAL_IS_NOEND(span2)))
> +           INTERVAL_NOBEGIN(result);
If `(INTERVAL_IS_NOBEGIN(span1) && INTERVAL_IS_NOEND(span2))` is false,
then we end up checking `INTERVAL_IS_NOBEGIN(span1)` twice

> For 1. I don't know how to format the code. I have a problem installing pg_indent. If the format is wrong, please
reformat.

I'll run pg_indent and send an updated patch if anything changes.

Thanks for your help on this patch!

- Joe Koshakow



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: fix and document CLUSTER privileges