> > psql could have an option to re-escape strings, but imho by default
> > should display what is stored, not what was typed in originally.
> > pg_dump _should_ re-escape everything, so that it reloads properly.
> 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?
We can include a command-line option to re-enable the escapes. Anyone
can use that form, and can define an alias for it if they need.
I understand your concern about backward compatibility, but imho the
convention it was using makes things more confusing, especially for a
new user. I'm not certain (assuming things have changed recently) that
the new behavior is what I would want, but the old behavior was not one
I would have guessed at.
Using psql to pipe output to another program is the best example of why
one might _not_ want to re-escape the strings. If the goal is to use
data from the database, then that data is what you will want to see in
Anyway, in the long run I'd like to consider moving toward a "no-escape"
default output for psql. If you think that it is too short notice to
fully understand the ramifications of a change this close to release, or
if your "faithful correspondents" have cottage cheese for brains, then
go ahead and revert it ;) But I like the new behavior in principle...
Another possibility is to make it a configuration option:
or something like that...
In response to
pgsql-hackers by date
|Next:||From: Thomas G. Lockhart||Date: 1998-10-10 04:37:37|
|Subject: Re: [HACKERS] Portability Issue in src/backend/port/snprintf.c (I think)|
|Previous:||From: Paul A Vixie||Date: 1998-10-10 04:09:53|
|Subject: Re: hackers-digest V1 #1013 |