Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2TG5qK41402 for ; Thu, 29 Mar 2001 11:05:52 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2TG5lw22464; Thu, 29 Mar 2001 11:05:47 -0500 (EST) To: "Martijn van Dijk" cc: pgsql-sql@postgresql.org Subject: Re: Escaping \ In-reply-to: <007a01c0b827$10d5b450$0301000a@collective> References: <007a01c0b827$10d5b450$0301000a@collective> Comments: In-reply-to "Martijn van Dijk" message dated "Thu, 29 Mar 2001 10:05:48 +0200" Date: Thu, 29 Mar 2001 11:05:47 -0500 Message-ID: <22461.985881947@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/610 X-Sequence-Number: 2281 "Martijn van Dijk" 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