Re: create function with dollar quoted body - Mailing list pgsql-jdbc

From Florent Guillaume
Subject Re: create function with dollar quoted body
Date
Msg-id CAF-4BpPVJXCB_+chp6jQuTaNdWnLAgrNcX_6wsLY14B+PHhbXQ@mail.gmail.com
Whole thread Raw
In response to Re: create function with dollar quoted body  (Jack Douglas <jack@douglastechnology.co.uk>)
List pgsql-jdbc
Please provide actual Java code.

Florent

On Sat, Mar 10, 2012 at 8:13 PM, Jack Douglas
<jack@douglastechnology.co.uk> wrote:
> 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
>


--
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: create function with dollar quoted body
Next
From: Dave Cramer
Date:
Subject: Re: oid int issue with CachedRowSet upgrading from JDBC 8.4 to 9.1