Re: dollar-quoting trouble

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: dollar-quoting trouble
Дата
Msg-id 20070419220757.GA27050@alvh.no-ip.org
обсуждение исходный текст
Ответ на dollar-quoting trouble  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список pgsql-general
Karsten Hilbert wrote:
> Hi all,
>
> I can't spot the trouble with this function definition:
>
> create function dem.trf_null_empty_title()
>     returns trigger
>     language plpgsql
>     as $null_empty_title$
> begin
>     if (NEW.title is null) then
>         return NEW;
>     end if;
>
>     if trim(NEW.title) <> '' then
>         return NEW;
>     end if;
>
>     NEW.title := NULL;
>     return NEW;
> end;
> $null_empty_title$;

Works for me ...

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: Postgres data/form entry tool
Следующее
От: Brent Wood
Дата:
Сообщение: Re: selective export for subsequent import (COPY)