Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E13E463431C for ; Sat, 23 Jan 2010 01:47:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 28606-08 for ; Sat, 23 Jan 2010 05:47:47 +0000 (UTC) X-Greylist: delayed 01:05:48.436518 by SQLgrey-1.7.6 Received: from tao.actarg.com (actarg.com [204.130.245.1]) by mail.postgresql.org (Postfix) with ESMTP id 349346336D0 for ; Sat, 23 Jan 2010 01:47:49 -0400 (AST) Received: from pip.actarg.com (pip.actarg.com [192.168.4.11]) by tao.actarg.com (8.14.2/8.14.2) with ESMTP id o0N4fuxH007224 for ; Fri, 22 Jan 2010 21:41:56 -0700 Received: from [10.0.2.15] (74-81-237-153.static.spvl001.digis.net [74.81.237.153]) (authenticated bits=0) by pip.actarg.com (8.13.6/8.13.6) with ESMTP id o0N4fuHO005708 for ; Fri, 22 Jan 2010 21:41:56 -0700 Message-ID: <4B5A7E04.8030905@actarg.com> Date: Fri, 22 Jan 2010 21:41:40 -0700 From: Kyle Bateman User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: clock command regression in pltcl? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201001/42 X-Sequence-Number: 33578 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