Escaping \

Поиск
Список
Период
Сортировка
От Martijn van Dijk
Тема Escaping \
Дата
Msg-id 007a01c0b827$10d5b450$0301000a@collective
обсуждение исходный текст
Ответы Re: Escaping \  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hello all,

I've a problem with escaping a \ in a string.

When I enter the query:

SELECT '''\\\''; I get the right result: '\'

But when I try this in a Function:

CREATE FUNCTION sp_tmp() RETURNS varchar(10)
AS '       SELECT ''\\\' AS RESULT'
LANGUAGE 'sql';

I get the following Parse-erros:

psql:tmp1:4: ERROR:  Unterminated quoted string. I don't understand why,
when you leave the SELECT-statement out you get '''\\\'' and that is not
unterminated.

Please help

Greetings

Martijn van Dijk






В списке pgsql-sql по дате отправления:

Предыдущее
От: Patrick Coulombe
Дата:
Сообщение: 3 options
Следующее
От: Peter Mount
Дата:
Сообщение: Re: Calling Java from psql (was Re: requesting help)