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

Re: Handling of \ in array data display

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Handling of \ in array data display
Date: 2006-08-19 00:08:42
Message-ID: 26341.1155946122@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> tarr[1] does not have a \, because it was eaten by the parser (so \y is
>> the same as a plain y).  tarr[2] does have a single backslash, which for
>> output purposes is shown escaped with another backslash when part of an
>> array, but unescaped when not.  I'm not sure if this qualifies as a bug
>> or not.

> I think it does.

This is documented behavior for arrays:
http://developer.postgresql.org/docs/postgres/arrays.html#AEN5764
and has been that way for a very long time.  If we change it we will
break every array-using application on the planet, because it will
in fact be impossible to parse an array value unambiguously.

I don't think "one user was confused" justifies fooling with this.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2006-08-19 12:00:51
Subject: Re: BUG #2581: Statistics buffer is full
Previous:From: Josh BerkusDate: 2006-08-18 23:07:06
Subject: Re: Handling of \ in array data display

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