Re: [HACKERS] psql \copy warning

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] psql \copy warning
Дата
Msg-id 22623.1149112972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] psql \copy warning  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] psql \copy warning
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> I have developed an updated patch that:
>>
>> o  turns off escape_string_warning in pg_dumpall.c
>> o  optionally use E'' for \password (undocumented option?)
>> o  honor standard_conforming-strings for \copy (but not
>> support literal E'' strings)
>> o  optionally use E'' for \d commands
>> o  turn off escape_string_warning for createdb, createuser,
>> droplang
>>
>> I agree someday we might want to turn off escape_string_warning, but I
>> think we should leave it on as long as possible as it is still pointing
>> out escape problem areas in the code.

I find this patch mighty ugly, and hope that most of it can get reverted
before 8.2.  The changes you made in describe.c are actively broken ...
didn't you test it?  appendStringLiteralConn doesn't know what you did.

I think that a far saner approach would be to make all these places use
appendStringLiteralConn, and to change *only* that routine to throw on
an E at need.  That would (a) not be broken, and (b) give us just one
place to change the behavior when it comes time.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCH] Magic block for modules
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] psql \copy warning