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

Appearance settings

Commit f021546

Browse filesBrowse 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 it doesn't really matter which timezone is used here, it does matter that the command not fall over entirely. We've now discovered that at least on FreeBSD, "clock scan" will fail if /etc/localtime is missing. It seems worth making the test insensitive to that. Per Tomas Vondras' buildfarm animal dikkop. Thanks to Thomas Munro for the diagnosis. Discussion: https://postgr.es/m/316d304a-1dcd-cea1-3d6c-27f794727a06@enterprisedb.com
1 parent 0cfc231 commit f021546
Copy full SHA for f021546

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/pl/tcl/expected/pltcl_setup.out
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/pl/tcl/sql/pltcl_setup.sql
+1-1Lines 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
create function tcl_date_week(int4,int4,int4) returns text as $$
145-
return [clock format [clock scan "$2/$3/$1"] -format "%U"]
145+
return [clock format [clock scan "$2/$3/$1" -gmt 1] -format "%U" -gmt 1]
146146
$$ language pltcl immutable;
147147

148148
select tcl_date_week(2010,1,26);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.