diff options
Diffstat (limited to 'src/pl/tcl/sql/pltcl_setup.sql')
-rw-r--r-- | src/pl/tcl/sql/pltcl_setup.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pl/tcl/sql/pltcl_setup.sql b/src/pl/tcl/sql/pltcl_setup.sql index 78ddd867eb4..17e09babb30 100644 --- a/src/pl/tcl/sql/pltcl_setup.sql +++ b/src/pl/tcl/sql/pltcl_setup.sql @@ -436,3 +436,14 @@ create operator @< ( procedure = tcl_int4lt ); +-- +-- Test usage of Tcl's "clock" command. In recent Tcl versions this +-- command fails without working "unknown" support, so it's a good canary +-- for initialization problems. +-- +create function tcl_date_week(int4,int4,int4) returns text as ' + return [clock format [clock scan "$2/$3/$1"] -format "%U"] +' language pltcl immutable; + +select tcl_date_week(2010,1,24); +select tcl_date_week(2001,10,24); |