Re: Covering the comparison between date and timestamp, tz, type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kwangwon Seo <anchovyseo(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Covering the comparison between date and timestamp, tz, type
Date: 2025-07-17 18:30:37
Message-ID: 1550778.1752777037@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kwangwon Seo <anchovyseo(at)gmail(dot)com> writes:
> Using the PostgreSQL code coverage report, I found that tests for
> comparisons between date and timestamp[tz] are missing. Some of them have
> only partial coverage.
> Attached patch will cover following functions:
> ...

I'm really not very excited about adding regression test cycles
forevermore just to make these functions show as covered in the
coverage report. They are all trivial wrappers around some
"internal" comparison function, and IMO what's important to
cover is that internal function. We don't necessarily need to
check every one of the wrappers, so long as the internal function
is fully exercised.

There are other functions in these files that'd be more worthy of
dedicated tests, because they are not just trivial wrappers around
something else. For instance, it doesn't look like date_decrement,
date_increment, date_skipsupport are reached at all.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2025-07-17 18:34:05 Re: IPC/MultixactCreation on the Standby server
Previous Message Peter Geoghegan 2025-07-17 18:26:35 Re: Returning nbtree posting list TIDs in DESC order during backwards scans