Received: from mailserver.diggynet.com (mailserver.diggynet.com [194.137.222.3]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2T89IU26912 for ; Thu, 29 Mar 2001 03:09:18 -0500 (EST) (envelope-from martijn@hardworks.nl) Received: from hardworks.nl ([213.136.3.223]) by mailserver.diggynet.com (Netscape Messaging Server 3.6) with ESMTP id AAA67F4 for ; Thu, 29 Mar 2001 08:04:23 +0000 Received: from collective [10.0.1.3] by hardworks.nl [10.0.1.1] with SMTP (MDaemon.v2.84.R) for ; Thu, 29 Mar 2001 10:01:56 +0200 Message-ID: <007a01c0b827$10d5b450$0301000a@collective> From: "Martijn van Dijk" TO: Subject: Escaping \ Date: Thu, 29 Mar 2001 10:05:48 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-Return-Path: martijn@hardworks.nl X-Archive-Number: 200103/597 X-Sequence-Number: 2267 Hello all, I've a problem with escaping a \ in a string. When I enter the query: SELECT '''\\\''; I get the right result: '\' 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: psql:tmp1:4: ERROR: Unterminated quoted string. I don't understand why, when you leave the SELECT-statement out you get '''\\\'' and that is not unterminated. Please help Greetings Martijn van Dijk