Re: Backslash handling in strings

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Backslash handling in strings
Дата
Msg-id 20050531150943.GA31259@wolff.to
обсуждение исходный текст
Ответ на Re: Backslash handling in strings  (Dennis Bjorklund <db@zigo.dhs.org>)
Ответы Re: Backslash handling in strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Tue, May 31, 2005 at 11:49:20 +0200, Dennis Bjorklund <db@zigo.dhs.org> wrote:
> On Tue, 31 May 2005, Tom Lane wrote:
> 
> > The case that convinced me we need to keep some sort of backslash
> > capability is this: suppose you want to put a string including a tab
> > into your database.  Try to do it with psql:
> >     t=> insert into foo values ('<TAB>
> > Guess what: you won't get anywhere, at least not unless you disable
> > readline.  So it's nice to be able to use \t.
> 
> To insert a tab using readline you can press ESC followed by TAB. This
> works as least in readline as it is setup in redhat/fedora (and readline
> can be setup in 1000 different ways so who knows how portable this is).

There are still advantages to having printable backslashed escaped characters
in strings that are saved to files. It makes it easier to see what is really
in the string and they are less likely to get accidentally munged when
editing the file or moving it between systems with different line termination
conventions.


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Cost of XLogInsert CRC calculations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ddl triggers