Skip to content

Commit d429ebe

Browse files
committed
Add a comment to AdjustIntervalForTypmod to reduce chance of future bugs.
It's not entirely evident how the logic here relates to the interval_transform function, so let's clue people in that they need to check that if the rules change.
1 parent 6656588 commit d429ebe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/utils/adt/timestamp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,8 @@ AdjustIntervalForTypmod(Interval *interval, int32 typmod)
10691069
* nonzero "month" field. However that seems a bit pointless when we
10701070
* can't do it consistently. (We cannot enforce a range limit on the
10711071
* highest expected field, since we do not have any equivalent of
1072-
* SQL's <interval leading field precision>.)
1072+
* SQL's <interval leading field precision>.) If we ever decide to
1073+
* revisit this, interval_transform will likely requite adjusting.
10731074
*
10741075
* Note: before PG 8.4 we interpreted a limited set of fields as
10751076
* actually causing a "modulo" operation on a given value, potentially

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy