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

Re: [HACKERS] backslash in psql output

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart), hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] backslash in psql output
Date: 1998-10-10 07:01:55
Message-ID: 199810100701.IAA17485@linda.lfix.co.uk (view raw or flat)
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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 



Responses

pgsql-hackers by date

Next:From: Oliver ElphickDate: 1998-10-10 07:44:01
Subject: CVS update
Previous:From: Paul A VixieDate: 1998-10-10 05:34:08
Subject: Re: [HACKERS] Open 6.4 items

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