Re: dollar-quoting trouble

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: dollar-quoting trouble
Date: 2007-04-20 02:40:45
Message-ID: 4628282D163.2BC0KG@129.180.47.120
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 19 Apr 2007 23:45:47 +0200, Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> wrote:
> 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$;
>
>
> PostgreSQL 8.1.8 (Debian/Etch) is telling me:
>
> psql:dem-identity.sql:43: ERROR: unterminated dollar-quoted string at or near "$null_empty_title$
> begin
> if (NEW.title is null) then
> return NEW;" at character 83

Does "psql --version" match "select version()"? There's a message in
the archive pgsql-bugs where this happened.

klint.

+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : kg(at)kgb(dot)une(dot)edu(dot)au : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-04-20 02:59:15 Re: Building PG 8.2.3 for x86_64 on Mac OS X 10.4.9
Previous Message Kevin Murphy 2007-04-20 01:41:21 Re: Building PG 8.2.3 for x86_64 on Mac OS X 10.4.9