Re: Clarification regarding array columns usage?

Поиск
Список
Период
Сортировка
От merlyn@stonehenge.com (Randal L. Schwartz)
Тема Re: Clarification regarding array columns usage?
Дата
Msg-id 86k4wal8ge.fsf@blue.stonehenge.com
обсуждение исходный текст
Ответ на Clarification regarding array columns usage?  ("m. hvostinski" <makhvost@gmail.com>)
Список pgsql-general
>>>>> "m" == m hvostinski <makhvost@gmail.com> writes:

m> I would appreciate if someone could clarify the aspects of using array
m> columns.

In general, bad idea.

m> We need to store up to ten related integer values per row and currently it
m> is implemented as a varchar column that holds a string that is concatenated
m> by a trigger function. Something like this:

Why?

If you were storing these as a daughter table, then you get
easy parsing, easy concurrent updating, easy access to aggregate
functions.  Just like SQL was meant to be used.

Stop thinking of tables as Excel sheets.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Out of space making backup
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Clarification regarding array columns usage?