Skip site navigation (1) Skip section navigation (2)

Re: Clarification regarding array columns usage?

From: merlyn(at)stonehenge(dot)com (Randal L(dot) Schwartz)
To: "m(dot) hvostinski" <makhvost(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Clarification regarding array columns usage?
Date: 2009-12-26 03:28:49
Message-ID: (view raw or whole thread)
Lists: pgsql-general
>>>>> "m" == m hvostinski <makhvost(at)gmail(dot)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:


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(at)stonehenge(dot)com> <URL:>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See for Smalltalk and Seaside discussion

In response to

pgsql-general by date

Next:From: Pavel StehuleDate: 2009-12-26 06:55:51
Subject: Re: Clarification regarding array columns usage?
Previous:From: Craig RingerDate: 2009-12-26 02:29:16
Subject: Re: Out of space making backup

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group