Re: [HACKERS] backslash in psql output

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: [HACKERS] backslash in psql output
Дата
Msg-id 199810100701.IAA17485@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: [HACKERS] backslash in psql output  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] backslash in psql output
Список pgsql-hackers
Bruce Momjian wrote:
  >> > now the format will be ambigious.
  >> >         test=> insert into test3 values ('\\x');
  >> >         test=> select * from test3;
  >> >         --
  >> >         \x
  >> > This used to show as:
  >> >         --
  >> >         \\x
  >> > Comments?
  >>...
  >But what about backward compatability?  Aren't there people expecting
  >psql output to show double backslashes?  What do we do to display pipes
  >in the output?

That change seems a good thing: the front-end ought to display what the
user wants.  Any manipulations should be done behind the scenes.  If I
store a DOS pathname, I don't want to see the backslashes doubled in it.
Even worse, I don't want to see them eliminated altogether, which is what
happens now if I don't remember to double them on input.

You mentioned that psql backslash-escapes the column delimiter character.
I think that this behaviour ought to be removed as well; it should be obvious
from the alignment with headings and other lines whether a pipe character is
part of the data or a column delimiter.  If it really matters, a user
can specify another character to use as delimiter.

An unsophisticated user expects to type characters and have them
accepted; he should not have to know that certain characters need to be
doubled or escaped, nor that certain characters he sees in the output are
to be ignored.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "He that covereth his sins shall not prosper; but whoso
      confesseth and forsaketh them shall have mercy."
                                         Proverbs 28:13



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] backslash in psql output
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: CVS update