Re: what data type to store fixed size integer?

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: what data type to store fixed size integer?
Дата
Msg-id 00c001cbf868$4328b6a0$c97a23e0$@yahoo.com
обсуждение исходный текст
Ответ на what data type to store fixed size integer?  (Arash pajoohande <apajoohande@gmail.com>)
Ответы Re: what data type to store fixed size integer?
Список pgsql-general

>>>> the data type does not need any arithmetic operations (as of integers).

 

You arguably do not have a number but simply a string that looks like a number.  Other examples are zip-codes and phone-numbers if you ignore symbols.  Thus you should probably use an appropriately sized char/varchar. 

 

Just something to consider; there is no hard and fast rule about this kind of thing.  If you can think of any logical use of arithmetic operators, even if you do not need them now, you should use an integer.

 

Dave



 

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

Предыдущее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: Global Variables in plpgsql
Следующее
От: George Woodring
Дата:
Сообщение: Re: autovacuum issue after upgrade to 9.0.1