Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id EAEC347679F for ; Fri, 22 Feb 2002 11:11:29 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 8C75FD600; Fri, 22 Feb 2002 08:11:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 7E1A25BF9; Fri, 22 Feb 2002 08:11:34 -0800 (PST) Date: Fri, 22 Feb 2002 08:11:34 -0800 (PST) From: Stephan Szabo To: Graham Vickrage Cc: Postgres SQL Subject: Re: quotes nightmare! In-Reply-To: Message-ID: <20020222081109.Q35057-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/315 X-Sequence-Number: 6737 On Fri, 22 Feb 2002, Graham Vickrage wrote: > I am having trouble with my quotes in a function and think I have tried > every comb (obviously not) as it does not work: > > I am trying to create a function within a function passing the second > function into the first as a parameter as follows:- > > CREATE FUNCTION _test(text) RETURNS int AS ' > BEGIN > EXECUTE '' > CREATE FUNCTION _test'' || $1 || '' () RETURNS int AS '' > BEGIN > RAISE EXCEPTION ''Help''; > RETURN 2; > END''; LANGUAGE ''plpgsql'' ''; shouldn't that first semicolon be inside the '' with the end? > RETURN 1; > END;' > LANGUAGE 'plpgsql'; > > SELECT _test('ing'); > > Could anyone tell me which bit is causing the problem as I am now completely > lost, the error message mentions is near LANGUAGE. > > Many thanks > > Graham. > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >