Re: Display format for column

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: Display format for column
Дата
Msg-id 20040507095832.GB621@zf.jcu.cz
обсуждение исходный текст
Ответ на Display format for column  (Abdul Wahab Dahalan <wahab@mimos.my>)
Список pgsql-sql
On Fri, May 07, 2004 at 05:08:21PM +0800, Abdul Wahab Dahalan wrote:
> Hi there!
> 
> How do we format column size for displaying data in postgresql.
> for example my data type for customername is varchar(100) and I want to 
> display the first 25 chars.
> How should I do that?
"display" a data is a client problem only, but you can select part ofstring:
   # select substring('qwertyuiopasdfg' from 0 for 8);    substring    -----------     qwertyu     or for your case:
selectsubstring(customername from 0 for 25) FROM yourtab;
 
http://www.postgresql.org/docs/7.4/static/functions-string.html
   Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/


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

Предыдущее
От: Abdul Wahab Dahalan
Дата:
Сообщение: Display format for column
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: EXPORT / IMPORT