Re: [Fwd: Re: dblink patches for comment]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [Fwd: Re: dblink patches for comment]
Дата
Msg-id 12893.1244313293@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [Fwd: Re: dblink patches for comment]  (Joe Conway <mail@joeconway.com>)
Ответы Re: [Fwd: Re: dblink patches for comment]  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> OK, got it. I think the attached is what you're looking for, although I 
> have not yet tested beyond "it compiles" and "it passes make installcheck".

You're making it vastly overcomplicated.  Just do something like
for (cp = str; *cp; cp++){    if (*cp == '\\' || *cp == '\'')        AppendStringInfoChar(buf, '\\');
AppendStringInfoChar(buf,*cp);}
 

Since you're working in a server-safe encoding, there is no need to
worry about multibyte characters --- the tests will never match
any byte of a multibyte char.
        regards, tom lane


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: [Fwd: Re: dblink patches for comment]
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: pg_migrator issue with contrib