Re: help with TCL function

Поиск
Список
Период
Сортировка
От Rolf Jentsch
Тема Re: help with TCL function
Дата
Msg-id 200309110933.42388.rje@epmail.ep.de
обсуждение исходный текст
Ответ на Re: help with TCL function  ("Jules Alberts" <jules.alberts@arbodienst-limburg.nl>)
Список pgsql-general
Am Donnerstag, 11. September 2003 08:59 schrieben Sie:
> Op 11 Sep 2003 (0:45), schreef ljb <lbayuk@mindspring.com>:
...
> -- This is the function
>
> create or replace function tlow() returns trigger as '
>   set NEW($1) [string tolower $NEW($1)]
>   return [array get NEW]'
> language 'pltcl';
>
...

You could either test with info exists or catch the error
create or replace function tlow() returns trigger as '
  if [info exists NEW($1)] {
    set NEW($1) [string tolower $NEW($1)]
  }
  return [array get NEW]'
language 'pltcl';

create or replace function tlow() returns trigger as '
  catch {
    set NEW($1) [string tolower $NEW($1)]
  }
  return [array get NEW]'
language 'pltcl';

--
Rolf Jentsch
Produktentwicklung EDV-Anwendungen für Mitglieder
ElectronicPartner GmbH & Co. KG
Düsseldorf


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

Предыдущее
От: Stéphane Cazeaux
Дата:
Сообщение: Re: Question about conccurrency control and Insert
Следующее
От: "Marek Lewczuk"
Дата:
Сообщение: MD5 function is not available ?