Skip site navigation (1) Skip section navigation (2)

Re: Backslash handling in strings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Greg Stark <gsstark(at)mit(dot)edu>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backslash handling in strings
Date: 2005-06-02 03:54:08
Message-ID: 200506020354.j523s8r05372@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Here is a summary of the issues with moving to no escapes for non-E
strings:

	http://candle.pha.pa.us/cgi-bin/pgescape

---------------------------------------------------------------------------

Bruno Wolff III wrote:
> On Tue, May 31, 2005 at 11:49:20 +0200,
>   Dennis Bjorklund <db(at)zigo(dot)dhs(dot)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.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Alon GoldshuvDate: 2005-06-02 04:30:01
Subject: Re: NOLOGGING option, or ?
Previous:From: Alvaro HerreraDate: 2005-06-02 03:41:29
Subject: Re: NOLOGGING option, or ?

pgsql-patches by date

Next:From: Luke LonerganDate: 2005-06-02 03:56:54
Subject: Re: COPY fast parse patch
Previous:From: Andrew DunstanDate: 2005-06-02 02:12:27
Subject: Re: COPY fast parse patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group