Re: help with TCL function

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: help with TCL function
Дата
Msg-id 200309101803.13890.dev@archonet.com
обсуждение исходный текст
Ответ на help with TCL function  ("Jules Alberts" <jules.alberts@arbodienst-limburg.nl>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Ayers
Дата:
Сообщение: Re: Picture with Postgres and Delphi
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.4 defaulting to ipv6 ?