Re: [NOVICE] encoding problems

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [NOVICE] encoding problems
Дата
Msg-id 20080312081627.GB28311@svana.org
обсуждение исходный текст
Ответ на Re: [NOVICE] encoding problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [NOVICE] encoding problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Mar 11, 2008 at 12:41:35PM -0400, Tom Lane wrote:
> > If I create the same function on my computer running PostgreSQL 8.3.0 and try
> > the \df+ then the Source Code shows:
>
> > \x09DECLARE
> > \x09\x09result text;
> > ...
>
> That's not an encoding problem, that's an intentional behavioral change
> in the way that psql formats strings for display.
>
> I guess it's a bit annoying if you were hoping that tabs would be useful
> for pretty-printing purposes.  Should we reconsider what's done with a
> tab in mbprint.c?

At the time that patch was introduced there was discussion about this.
The problem being that psql has no idea what will actually happen to
the cursor when it emits a tab. You can guess but in the end we decided
it was more important to have the display not messed up than displaying
tabs as is.

The other alternative is to convert tabs to spaces on output. Can't
remember why we didn't do that.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Noob Hints on testing and debugging?
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Add: > o Add SQLSTATE severit yto PGconn return status > >