Re: Access to an element of array NEW in TCL - Mailing list pgsql-general

From Josué Maldonado
Subject Re: Access to an element of array NEW in TCL
Date
Msg-id bj58a4$1dq7$1@news.hub.org
Whole thread Raw
In response to Re: Access to an element of array NEW in TCL  (darren@crystalballinc.com)
List pgsql-general
Hi Darren,

You are right, it was something missing in my code the \' to escape the
quote.

Thanks.

darren@crystalballinc.com wrote:
> The way you have it should work i.e. if the NEW array has a field called
> duser in it you will be able to access it using $NEW(duser)
>
> Put in an elog notice and do [array names NEW] in it.
> Run the function and see what variables are available to you then you
> should be able to call them just like shown below
>
> -bash-2.05b$ tclsh
> % set NEW(duser) darren
> darren
> % set NEW(cuser) carl
> carl
> % foreach id [array names NEW] { puts $NEW($id) }
> carl
> darren
> % puts $NEW(duser)
> darren
> % puts $NEW(cuser)
> carl


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-advocacy] Web page for selecting presentations
Next
From: Terry Yapt
Date:
Subject: Re: Oracle decode Function in Postgres