Re: What is wrong?
От | Stephan Szabo |
---|---|
Тема | Re: What is wrong? |
Дата | |
Msg-id | Pine.BSF.4.21.0109282317330.29157-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | What is wrong? (Wei Weng <wweng@kencast.com>) |
Список | pgsql-sql |
On 28 Sep 2001, Wei Weng wrote: > 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? I think you need to use four backslashes to do the quoting for the backslash. Plus you're going to need to declare that variable.
В списке pgsql-sql по дате отправления: