Re: when to use char, varchar or text

Поиск
Список
Период
Сортировка
От Joshua b. Jore
Тема Re: when to use char, varchar or text
Дата
Msg-id Pine.BSO.4.44.0205230731500.29256-100000@kitten.greentechnologist.org
обсуждение исходный текст
Ответ на when to use char, varchar or text  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список pgsql-novice
I'm not sure what you are implementing but as I recall any single address
may be longer than 200 characters. That may not be terribly likely in
practice but it is allowed and your mail program would be expected to
allow it. I also wonder whether you mean to concatenate the addresses via
', ' or how you are going to store multiple To, CC, etc recipients.

The nature of where you are working advocates for the text datatype.

Joshua b. Jore
http://www.greentechnologist.org

On Thu, 23 May 2002, Rory Campbell-Lange wrote:

> I'm making a table to hold a queue of incoming and outgoing email
> messages. I'm confused about using char, varchar or text fields - I
> imagine they are searchable (without and index) with decreasing speed
> from char to text. Is that right?
>
> The (very simplified) column setup I have includes:
>     to            varchar(200)
>     from          varchar(200)
>     cc              varchar(200)
>     subject          text
>     body          text
>
> Should I make the columns all of type text so that large numbers of 'to'
> recipients can be supported?
>
> Some general advice greatly appreciated.
>
> p.s. I expect the number of rows in this table to be less than 5000.
>
> --
> Rory Campbell-Lange
> <rory@campbell-lange.net>
> <www.campbell-lange.net>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


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

Предыдущее
От: Rory Campbell-Lange
Дата:
Сообщение: when to use char, varchar or text
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: optimising data load