Re: dollar-quoting trouble

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: dollar-quoting trouble
Date: 2007-04-19 22:07:57
Message-ID: 20070419220757.GA27050@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2007-04-19 23:19:06 Re: selective export for subsequent import (COPY)
Previous Message William Contreras 2007-04-19 21:57:29 Bug o not bug in subqueries