Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2
Дата
Msg-id 29487.1564071212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2  (Jorge Gustavo Rocha <jgr@geomaster.pt>)
Re: BUG #15827: Unable to connect on Windows using pg_services.confusing Python psycopg2  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
I wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> I really think that
>> we should stick with the approach of only removing \r when it is
>> followed by \n as we basically want to be able to counter the text
>> mode of Windows when something external wrote files read by our code,
>> where \n has been magically transformed to \r\n.

> As I said, I'm not convinced that filtering \r only where it's actually
> adjacent to \n is sufficient, even on Windows.  To suppose that it is
> sufficient, you'd have to assume that fgets() guarantees not to split
> the \r and \n across buffer boundaries, which I doubt that it does.
> (If it does do that, it would break some other assumptions we have about
> whether the buffer gets filled completely.)

Hearing nothing further on this, I went ahead with the patch as I had it
on HEAD, and a tweaked version of your patch on the back branches.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15924: Query Execution and variable declaration
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15924: Query Execution and variable declaration