Re: How to implement word wrap

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: How to implement word wrap
Дата
Msg-id 371F6ECE-4543-4489-B903-9268C531139D@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на Re: How to implement word wrap  ("Andrus" <kobruleht2@hot.ee>)
Ответы Re: How to implement word wrap
Список pgsql-general
On 30 Mar 2010, at 11:32, Andrus wrote:

>> Just realised that's not what you're after, but my first point still stands.
>
> Thank you.
> I tried to wrap words at 15 characters using code below.


Really, write a stored procedure that accepts (text, line_length) and returns SETOF text. You could even add
hyphenationfor the appropriate language if you go that route. For the latter it's probably best to write it in C so you
canlink hyphenation libraries to your code. 

Another approach that may be viable is to use windowing functions, but I'm not so sure it's possible to have a window
thatis being defined by the data it's running over (eg. a window defined by the length of an accumulated line of text). 

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4bb1d23410411798520618!



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

Предыдущее
От: Ole Tange
Дата:
Сообщение: Re: insert into test_b (select * from test_a) with different column order
Следующее
От: "Davor J."
Дата:
Сообщение: Emphasizing "current item" in subclass of QAbstractItemView