Re: psql eating backslashes - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: psql eating backslashes
Date
Msg-id Pine.LNX.4.21.0007172026560.2925-100000@localhost.localdomain
Whole thread Raw
In response to psql eating backslashes  (JanWieck@t-online.de (Jan Wieck))
Responses Re: psql eating backslashes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Jan Wieck writes:

>     seems  to me that psql thinks to know a little too much about
>     quoting. I'm not able to qoute a backslash at the  end  of  a
>     line:
> 
>         xxx=# select 'a\\b\\
>         xxx'# c';
>          ?column?
>         ----------
>          a\b
>         c
>         (1 row)

I committed a fix that should give you better results.

peter=# select 'abc\\
peter'# def';?column?
----------abc\
def
(1 row)

But what should

peter=# select 'abc\
peter'# def';

do? This doesn't seem right:
?column?
----------abc
def
(1 row)

Should the newline be stripped?


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Update: mac.c update, patch now on ftp
Next
From: "Larry Rosenman"
Date:
Subject: RE: Update: mac.c update, patch now on ftp