Re: Error in creating function

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Error in creating function
Date: 2007-12-06 13:25:06
Message-ID: 20071206132505.GC15524@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Thu, dem 06.12.2007, um 4:16:14 -0800 mailte Yancho folgendes:
> I am trying to create a function, which takes the nearest 3 hospitals
> to a point making use of a PostGIS function), and then check each
> hospital for the exact distance on roads (by making use of a pgRouting
> function).
>
> Below please find a copy of my function, and u can also find it
> highlighted here : http://yancho.pastebin.com/f13cc045e
>
> CREATE OR REPLACE FUNCTION near_hospital(text, integer, integer)
> RETURNS integer AS
> $BODY$
> ...
> END;
>
> ' language 'plpgsql';
>
>
> The error being given by pgAdminIII is : unterminated dollar-quoted
> string at or near "$BODY$" [then some garbled text] for $1;
>
> Any help will be extremely appreciated!

change the last line into:

$BODY$ language 'plpgsql';

Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cedric Boudin 2007-12-06 13:53:13 Re: simple update on boolean
Previous Message A. Kretschmer 2007-12-06 13:22:43 Re: how to redirect output to a file