Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7262f24

Browse files
committed
Fix BRIN minmax-multi distance for timetz type
The distance calculation ignored the time zone, so the result of (b-a)might have ended negative even if (b > a). Fixed by considering the timezone difference.Reported-by: Jaime CasanovaDiscussion:https://postgr.es/m/CAJKUy5jLZFLCxyxfT%3DMfK5mtPfSzHA1rVLowR-j4RRsFVvKm7A%40mail.gmail.com
1 parent2b10e0e commit7262f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/brin/brin_minmax_multi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2090,7 +2090,7 @@ brin_minmax_multi_distance_timetz(PG_FUNCTION_ARGS)
20902090
TimeTzADT*ta=PG_GETARG_TIMETZADT_P(0);
20912091
TimeTzADT*tb=PG_GETARG_TIMETZADT_P(1);
20922092

2093-
delta=tb->time-ta->time;
2093+
delta=(tb->time-ta->time)+ (tb->zone-ta->zone)*USECS_PER_SEC;
20942094

20952095
Assert(delta >=0);
20962096

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp