Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id A98FA1EB4C50 for ; Sat, 10 Mar 2012 15:13:46 -0400 (AST) Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S6Rjd-0005M5-Ct for pgsql-jdbc@postgresql.org; Sat, 10 Mar 2012 19:13:46 +0000 Received: from [82.68.43.86] (helo=aylesbury) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.72) (envelope-from ) id 1S6RjP-0007lp-3V for pgsql-jdbc@postgresql.org; Sat, 10 Mar 2012 19:13:31 +0000 Received: from [192.168.0.21] (localhost [127.0.0.1]) by aylesbury (Postfix) with ESMTPA id DE1C1180AB2 for ; Sat, 10 Mar 2012 19:13:30 +0000 (GMT) Message-ID: <4F5BA7CE.7030907@douglastechnology.co.uk> Date: Sat, 10 Mar 2012 19:13:18 +0000 From: Jack Douglas User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: create function with dollar quoted body References: <4F5A62BB.9000206@douglastechnology.co.uk> In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Originating-Smarthost03-IP: [82.68.43.86] X-Pg-Spam-Score: -0.0 (/) X-Archive-Number: 201203/22 X-Sequence-Number: 22761 Hi > Please give a code example reproducing the problem you see. This works fine: create or replace function f() returns text language plpgsql as 'begin return ''A''; end;'; But this fails with "unterminated dollar-quoted string": create or replace function f() returns text language plpgsql as $$begin return 'A'; end;$$; It is not a general problem with dollar-quoting because this works: create or replace function f() returns text language plpgsql as 'begin return $$A$$; end;'; Thanks Jack