Re: A modest proposal for a FAQ addition

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: A modest proposal for a FAQ addition
Дата
Msg-id 200301121206.09081.barwick@gmx.net
обсуждение исходный текст
Ответ на Re: A modest proposal for a FAQ addition  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: A modest proposal for a FAQ addition  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Sunday 12 January 2003 06:17, Bruce Momjian wrote:
> Tom Lane wrote:
> > Q: Why do I get strange results with a CHAR(n) field?
> >
> > A. Don't use CHAR(n).  VARCHAR(n) has the behavior you are probably
> > expecting; on top of which it's more compact and usually faster.
> >
> >
> > I suppose the above needs some fleshing out, but man am I getting tired
> > of explaining about significant vs non-significant trailing blanks.
>
> OK, good point.  I was mentioning CHAR() in the FAQ entry first, while
> it should have been mentioned later.  I also added a specific mention of
> the trailing spaces issue.  Patch attached.

Err, from the patch:

"CHAR(n) stores trailing spaces, while VARCHAR(n) trims them."

Surely this should read something like:

"CHAR(n) automatically pads strings with trailing blanks to the defined
column length."


Ian Barwick
barwick@gmx.net



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: A modest proposal for a FAQ addition
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Roadmap for 7.4