[PATCH] Formatting patch for psql

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема [PATCH] Formatting patch for psql
Дата
Msg-id 20051117134859.GD22933@svana.org
обсуждение исходный текст
Ответы Re: [PATCH] Formatting patch for psql  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
Hi,

Here is my patch to make psql handle multi-line output sanely. Instead
of embedded newlines splattering your output across the screen,
everything gets indented to the right column.

It basically works by extending the *_width functions to instead work
out the estimate width, height and formatting space of each cell. Then
the output goes through each cell formatting as it goes and outputting
lines at the right places.

I imagine it will be tweaked by others because everybody has different
ideas about how they want the output done. This just has the minimum
extra formatting to make the output unambiguous.

Also available at: http://svana.org/kleptog/pgsql/psql-format.patch

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: Numeric 508 datatype
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: drop if exists