Re: psql eating backslashes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql eating backslashes
Date: 2000-07-17 21:42:12
Message-ID: 4866.963870132@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> But what should

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

> do? This doesn't seem right:

> ?column?
> ----------
> abc
> def
> (1 row)

Looks fine to me.

> Should the newline be stripped?

I would think not. That would mean that backslash-newline gives you
something *other* than a literal newline, which is an inconsistency
we don't need since we don't treat newline as special.

Also, it would be changing the old (pre-7.0) behavior, which would
doubtless break someone's code somewhere. In the absence of a
compelling reason to change the behavior, I think we have to leave it
alone.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-17 21:46:01 Re: Update: mac.c update, patch now on ftp
Previous Message Tom Lane 2000-07-17 21:35:37 Re: TUPLE SIZE HELP