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 ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match