Re: is it a bug?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: is it a bug?
Дата
Msg-id 3A23C5B5.1D15C59@alumni.caltech.edu
обсуждение исходный текст
Ответ на is it a bug?  ("He weiping" <laser@zhengmai.com.cn>)
Список pgsql-hackers
> ... it seems the "lpad", "rpad" don't work,
> when I type:
> select lpad('laser', 4, 'a');
> in psql, the result is still
> 'laser', the same with 'rpad',
> Is it a bug or I'm mis-understaning the lpad and/or rpad functions?

A simple misunderstanding. The length argument is for the *total*
length. So padding a 5 character string to a length of 4 will do
nothing. But padding to a length of 6 will add a single "a" to the
string.

                        - Thomas

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

Предыдущее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: Constraint names using 'user namespace'?
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: is it a bug?