Quoting in stored procedures - Mailing list pgsql-hackers

From pgsql-hackers@mail.remote.org
Subject Quoting in stored procedures
Date
Msg-id 199908282127.RAA16020@hub.org
Whole thread Raw
Responses Re: [HACKERS] Quoting in stored procedures
List pgsql-hackers
The syntax needed for defining functions is quite annoying because of the
needed quoting. Example:

CREATE FUNCTION bla (int4) RETURNS char AS '       BEGIN               RETURN ''Two quotes needed''       END;
' LANGUAGE 'plpgsql';       
How about allowing something like in shell here-documents:       
CREATE FUNCTION bla (int4) RETURNS char LANGUAGE 'plpgsql' UNTIL '__EOF__';       BEGIN               RETURN 'Only one
quoteneeded'       END;
 
__EOF__

Or similar. The __EOF__ is of course totally arbitrary and every string can
be used, so this will work with any language used.

jochen


pgsql-hackers by date:

Previous
From: Jochen Topf
Date:
Subject: Quoting in stored procedures
Next
From: Michael Richards
Date:
Subject: entries in pg_shadow