What is wrong? - Mailing list pgsql-sql

From Wei Weng
Subject What is wrong?
Date
Msg-id 1001706359.11935.4.camel@Monet
Whole thread Raw
Responses Re: What is wrong?
Entering data in serial column
List pgsql-sql
Hi there. I wrote a simple postgresql sql function as follows:

create function test() returns integer as '
begin
fixed_path := translate (''/text'', ''\\'', ''/'');
raise notice ''fixed_path:'', fixed_path;
return 1;
end
' language 'plpgsql';

And when I ran it as 

pgsql>select test();

I got:

NOTICE:  plpgsql: ERROR during compile of test near line 8
ERROR:  unterminated string starting on line 10

What is wrong? (something fishy about translate function?) Could anyone
enlighten me on this?

Thank you very much!

Wei



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: simple question!
Next
From: Haller Christoph
Date:
Subject: Re: TEXT in select