Re: [BUGS] BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"

2009-07-09 Thread Jack Douglas
> The function body contains >        return '\'; > > and that string literal causes a syntax error when we come to parse the > RETURN statement. Thanks for the explanation - very clear. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://

Re: [BUGS] BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"

2009-07-08 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> Or you could turn on standard_conforming_strings if you'd prefer not >> to deal with escapes. > That doesn't help with this, because of the separate pgpgsql parser: Ah, sorry, it does work in 8.4 but not before. regards, t

Re: [BUGS] BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"

2009-07-08 Thread Kevin Grittner
Tom Lane wrote: > Or you could turn on standard_conforming_strings if you'd prefer not > to deal with escapes. That doesn't help with this, because of the separate pgpgsql parser: ccdev=> select version(); version --

Re: [BUGS] BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"

2009-07-08 Thread Tom Lane
"Jack Douglas" writes: > Am I missing something obvious here - I understand from the documentation no > escapes are counted in dollar quoted strings? Yes, and yes. > postgres=> create or replace function temp() returns text language plpgsql > AS $$ > postgres$> begin > postgres$> return '\'; >