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

Commit90ef9d9

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 parent4d10fda commit90ef9d9

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
@@ -542,7 +542,7 @@ CREATE OPERATOR CLASS tcl_int4_ops
542542
-- for initialization problems.
543543
--
544544
create function tcl_date_week(int4,int4,int4) returns text as $$
545-
return [clock format [clock scan "$2/$3/$1"] -format "%U"]
545+
return [clock format [clock scan "$2/$3/$1" -gmt 1] -format "%U" -gmt 1]
546546
$$ language pltcl immutable;
547547
select tcl_date_week(2010,1,26);
548548
tcl_date_week

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ CREATE OPERATOR CLASS tcl_int4_ops
596596
-- for initialization problems.
597597
--
598598
createfunctiontcl_date_week(int4,int4,int4) returnstextas $$
599-
return [clock format [clock scan"$2/$3/$1"]-format"%U"]
599+
return [clock format [clock scan"$2/$3/$1"-gmt1]-format"%U"-gmt1]
600600
$$ language pltcl immutable;
601601

602602
select tcl_date_week(2010,1,26);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp