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

Commitf021546

Browse files
committed
Remove environment sensitivity in pl/tcl regression test.
Add "-gmt 1" to our test invocations of the Tcl "clock" command,so that they do not consult the timezone environment. While itdoesn't really matter which timezone is used here, it doesmatter that the command not fall over entirely. We've nowdiscovered that at least on FreeBSD, "clock scan" will fail if/etc/localtime is missing. It seems worth making the testinsensitive to that.Per Tomas Vondras' buildfarm animal dikkop. Thanks toThomas Munro for the diagnosis.Discussion:https://postgr.es/m/316d304a-1dcd-cea1-3d6c-27f794727a06@enterprisedb.com
1 parent0cfc231 commitf021546

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/pl/tcl/expected/pltcl_setup.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ CREATE OPERATOR CLASS tcl_int4_ops
119119
-- for initialization problems.
120120
--
121121
create function tcl_date_week(int4,int4,int4) returns text as $$
122-
return [clock format [clock scan "$2/$3/$1"] -format "%U"]
122+
return [clock format [clock scan "$2/$3/$1" -gmt 1] -format "%U" -gmt 1]
123123
$$ language pltcl immutable;
124124
select tcl_date_week(2010,1,26);
125125
tcl_date_week

‎src/pl/tcl/sql/pltcl_setup.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ CREATE OPERATOR CLASS tcl_int4_ops
142142
-- for initialization problems.
143143
--
144144
createfunctiontcl_date_week(int4,int4,int4) returnstextas $$
145-
return [clock format [clock scan"$2/$3/$1"]-format"%U"]
145+
return [clock format [clock scan"$2/$3/$1"-gmt1]-format"%U"-gmt1]
146146
$$ language pltcl immutable;
147147

148148
select tcl_date_week(2010,1,26);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp