Received: from btclick.com (mta02.btfusion.com [62.172.195.247]) by postgresql.org (Postfix) with ESMTP id 61462475896 for ; Fri, 22 Feb 2002 08:15:56 -0500 (EST) Received: from [213.120.146.35] ([213.120.146.35]) by btclick.com (Netscape Messaging Server 4.15) with SMTP id GRXRIM04.5PS for ; Fri, 22 Feb 2002 13:15:58 +0000 From: "Graham Vickrage" To: "Postgres SQL" Subject: quotes nightmare! Date: Fri, 22 Feb 2002 13:18:51 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200202/305 X-Sequence-Number: 6728 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'' ''; 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.