pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Graham Vickrage <graham@digitalplanit.com>
To: Postgres SQL <pgsql-sql@postgresql.org>
Subject: quotes nightmare!
Date: Fri, 22 Feb 2002 13:18:51 -0000
Message-ID: <NDBBJABDILOPAOOMFJHOGECGDEAA.graham@digitalplanit.com> (raw)

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.






view thread (3+ messages)  latest in thread

Message-ID: <NDBBJABDILOPAOOMFJHOGECGDEAA.graham@digitalplanit.com>
Permalink:  ../NDBBJABDILOPAOOMFJHOGECGDEAA.graham@digitalplanit.com/
Also on:    postgresql.org/message-id/NDBBJABDILOPAOOMFJHOGECGDEAA.graham@digitalplanit.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: graham@digitalplanit.com
  Subject: Re: quotes nightmare!
  In-Reply-To: <NDBBJABDILOPAOOMFJHOGECGDEAA.graham@digitalplanit.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox