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

Commit9524c6b

Browse files
committed
Repair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov. Comparison
of timetz values misbehaved in --enable-integer-datetime cases, andEXTRACT(EPOCH) subtracted the zone instead of adding it in all cases.Backpatch to all supported releases (except --enable-integer-datetime codedoes not exist in 7.2).
1 parent6fbda16 commit9524c6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.64.2.3 2002/09/30 20:57:10 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.64.2.4 2005/04/23 22:54:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1553,7 +1553,7 @@ timetz_part(PG_FUNCTION_ARGS)
15531553
}
15541554
}
15551555
elseif ((type==RESERV)&& (val==DTK_EPOCH))
1556-
result=time->time-time->zone;
1556+
result=time->time+time->zone;
15571557
else
15581558
{
15591559
elog(ERROR,"TIMETZ units '%s' not recognized",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp