how do you call one pltcl function from another?

From: "Jonathan Ellis" <jellis(at)advocast(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: how do you call one pltcl function from another?
Date: 2000-11-06 15:29:07
Message-ID: 041301c04806$4d65e160$0d00a8c0@dsl.inconnect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I tried mailing this last week, but I think it didn't get sent:

I defined a procedure

CREATE FUNCTION meta_class (varchar) RETURNS varchar AS '
...
' LANGUAGE 'pltcl';

This works fine. But when I want to call it from another tcl procedure I
get errors:
bf2=# CREATE FUNCTION foo (varchar) RETURNS varchar AS '
return [meta_class $1]
' LANGUAGE 'pltcl';

bf2'# bf2'# CREATE

bf2=# bf2=# select foo(class) from weapon_Types;
ERROR: pltcl: invalid command name "meta_class"

This IS possible -- isn't it?

-Jonathan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tara Pierkowski 2000-11-06 15:43:42 Insert via Select Problem
Previous Message Marcin Mazurek 2000-11-06 14:45:48 order of trigger sequence