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

From Jack Douglas
Subject Re: create function with dollar quoted body
Date
Msg-id 4F5BA7CE.7030907@douglastechnology.co.uk
Whole thread Raw
In response to Re: create function with dollar quoted body  (Florent Guillaume <fg@nuxeo.com>)
Responses Re: create function with dollar quoted body  (Florent Guillaume <fg@nuxeo.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Florent Guillaume
Date:
Subject: Re: create function with dollar quoted body
Next
From: Thomas Kellerer
Date:
Subject: Re: create function with dollar quoted body