Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (Postfix) with ESMTP id F3B84476836 for ; Fri, 22 Feb 2002 11:28:34 -0500 (EST) Received: from roberto by brasileiro.net with local (Exim 3.34 #1 (Debian)) id 16eIZ6-0000tk-00; Fri, 22 Feb 2002 09:28:56 -0700 Date: Fri, 22 Feb 2002 09:28:56 -0700 From: Roberto Mello To: Graham Vickrage Cc: Postgres SQL Subject: Re: quotes nightmare! Message-ID: <20020222162856.GC959@cc.usu.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i X-Archive-Number: 200202/316 X-Sequence-Number: 6738 On Fri, Feb 22, 2002 at 01:18:51PM +0000, Graham Vickrage wrote: > BEGIN > EXECUTE '' > CREATE FUNCTION _test'' || $1 || '' () RETURNS int AS '' When you enter these '' you are ending the EXECUTE block. If you don't want to end thit EXECUTE block, then you have to espace each of these quotes. > Could anyone tell me which bit is causing the problem as I am now completely > lost, the error message mentions is near LANGUAGE. You should look at: http://www.postgresql.org/idocs/index.php?plpgsql-porting.html#PLPGSQL-QUOTING-TABLE http://www.postgresql.org/idocs/index.php?plpgsql-porting.html#PLPGSQL-PORTING-NASTYQUOTE -Roberto -- +----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer Advisor: The guy who told you how to screw up