Re: [HACKERS] backslash in psql output
От | Thomas G. Lockhart |
---|---|
Тема | Re: [HACKERS] backslash in psql output |
Дата | |
Msg-id | 361EE0CC.6F364FDD@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: [HACKERS] backslash in psql output (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] backslash in psql output
|
Список | pgsql-hackers |
> > 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 the pipe. 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... - Tom Another possibility is to make it a configuration option: ./configure --enable-psql-string-escapes or something like that...
В списке pgsql-hackers по дате отправления: