pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyle Bateman <kyle@actarg.com>
To: pgsql-sql@postgresql.org
Subject: clock command regression in pltcl?
Date: Fri, 22 Jan 2010 21:41:40 -0700
Message-ID: <4B5A7E04.8030905@actarg.com> (raw)

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




view thread (4+ messages)  latest in thread

Message-ID: <4B5A7E04.8030905@actarg.com>
Permalink:  ../4B5A7E04.8030905@actarg.com/
Also on:    postgresql.org/message-id/4B5A7E04.8030905@actarg.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: kyle@actarg.com
  Subject: Re: clock command regression in pltcl?
  In-Reply-To: <4B5A7E04.8030905@actarg.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox