Re: About column type to "varchar(1)" or "char(1)"

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: About column type to "varchar(1)" or "char(1)"
Дата
Msg-id 20050824222831.GA25775@svana.org
обсуждение исходный текст
Ответ на About column type to "varchar(1)" or "char(1)"  (Emi Lu <emilu@cs.concordia.ca>)
Список pgsql-general
On Wed, Aug 24, 2005 at 03:06:18PM -0400, Emi Lu wrote:
> Good afternoon,
>
> A question about varchar(1) and char(1).

<snip>

> As a result, setup 'col1' to either "varchar(1)" or "char(1)" does not
> matter at all?

As far as storage goes, nope. Think about it, depending on your
encoding, 1 character might be 4 bytes.

char() adds padding but varchar() doesn't. That's the difference
really...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: William Yu
Дата:
Сообщение: Re: Postgresql replication
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Postgresql replication