Re: PL/Python patch for Universal Newline Support

Поиск
Список
Период
Сортировка
Искать
От
Neil Conway
Тема
Re: PL/Python patch for Universal Newline Support
Дата
Msg-id
423E071C.4010901@samurai.com
Ответ на
Список
Дерево обсуждения
PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support Neil Conway <neilc@samurai.com>
Re: PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support "Andrew Dunstan" <andrew@dunslane.net>
Re: PL/Python patch for Universal Newline Support Michael Fuhr <mike@fuhr.org>
Re: PL/Python patch for Universal Newline Support Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/Python patch for Universal Newline Support Tom Lane <tgl@sss.pgh.pa.us>
Michael Fuhr wrote:
> Should the PL/Python documentation mention this behavior?

Isn't this the behavior the user would expect? If so, I guess it's okay 
not to document it.

> How should I submit regression tests?

Yes, please.

> *** src/pl/plpython/plpython.c	17 Dec 2004 02:14:48 -0000	1.58
> --- src/pl/plpython/plpython.c	19 Mar 2005 04:29:55 -0000
> ***************
> *** 1206,1215 ****
>   
>   	while (*sp != '\0')
>   	{
> ! 		if (*sp == '\n')
>   		{
> ! 			*mp++ = *sp++;
>   			*mp++ = '\t';
>   		}
>   		else
>   			*mp++ = *sp++;
> --- 1206,1219 ----
>   
>   	while (*sp != '\0')
>   	{
> ! 		if (*sp == '\r' && *(sp + 1) == '\n')
> ! 			sp++;
> ! 
> ! 		if (*sp == '\n' || *sp == '\r')
>   		{
> ! 			*mp++ = '\n';
>   			*mp++ = '\t';
> + 			sp++;
>   		}
>   		else
>   			*mp++ = *sp++;

Does this work for "\r\n" embedded in string literals?

-Neil
В списке pgsql-patches по дате отправления
От: Neil Conway
Дата:
От: Neil Conway
Дата:
FAQ