Re: fieldwidths

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fieldwidths
Дата
Msg-id 9992.1048223870@sss.pgh.pa.us
обсуждение исходный текст
Ответ на fieldwidths  (ahoward <ahoward@fsl.noaa.gov>)
Список pgsql-general
ahoward <ahoward@fsl.noaa.gov> writes:
> i've looked through to docs a bit, but have not found a way to quickly
> calculate the maximum fieldwidth of each field in a tuple set.

There is no general-purpose method for doing that.

> obviously psql does something internally to do it's formatting, but whatever
> it does is very fast... any ideas?

psql runs through the actual strings returned by the query and takes the
max length in each column.  Not very brilliant ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Multiple backend connections
Следующее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Extracting time from timestamp