From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: help with TCL function |
Date: | 2003-09-10 17:03:13 |
Message-ID: | 200309101803.13890.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wednesday 10 September 2003 14:27, Jules Alberts wrote:
>
> I use it to force lowercase of values inserted in the db. There is one
> problem though, if the parameter is absent, the function will give an
> error message. I would like it to rather check for null before tolower
> is applicated. In semicode:
>
> if ($1 <> NULL) {
> set NEW($1) [string tolower $NEW($1)]
> }
> return [array get NEW]'
>
> but I have no idea how to do this in TCL. Can somebody please tell me?
> Thanks a lot!
According to the manuals:
$NEW
An associative array containing the values of the new table row for
INSERT/UPDATE actions, or empty for DELETE. The array is indexed by field
name. Fields that are NULL will not appear in the array!
Is that any use?
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-09-10 17:03:21 | Re: 7.4 defaulting to ipv6 ? |
Previous Message | Bruce Momjian | 2003-09-10 17:00:36 | Re: 7.4 defaulting to ipv6 ? |