I have the following function defined:

create function _date_week(int4,int4,int4) returns text language pltcl immutable as $$
    return [clock format [clock scan "$2/$3/$1"] -format "%U"]
$$;

It worked fine in 8.3 but in 8.4 now I try to build an index using the function and get:

SQL ERROR: In database query: begin;
create index i_pay_req_empl_id_week on pay_req (empl_id,(date_week(wdate)));: ERROR: invalid command name "clock"
CONTEXT:  invalid command name "clock"
    invoked from within
"clock scan "$2/$3/$1""
    (procedure "__PLTcl_proc_12360682" line 3)
    invoked from within
"__PLTcl_proc_12360682 2003 12 20"
in PL/Tcl function "_date_week"
PL/pgSQL function "date_week" line 13 at assignment

Is this a regression or is there a reason the clock command is no longer accessible?

Kyle


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to