"Martijn van Dijk" <martijn@hardworks.nl> writes:
> But when I try this in a Function:
> CREATE FUNCTION sp_tmp() RETURNS varchar(10)
> AS '
> SELECT ''\\\' AS RESULT'
> LANGUAGE 'sql';
> I get the following Parse-erros:
You need an extra level of quoting because the function body is itself
a string literal. You might find the quoting discussion in
http://www.postgresql.org/devel-corner/docs/postgres/plpgsql-porting.html
helpful.
regards, tom lane