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

Re: More then 1600 columns?

From: "Mark Mitchell" <mmitchell(at)riccagroup(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: More then 1600 columns?
Date: 2010-11-12 15:38:03
Message-ID: c3a5a583-17b8-42f8-b585-e6bbcd0f82b3@riccagroup.com (view raw or flat)
Thread:
Lists: pgsql-general
Yes I understand that this is "bad design" but what we are doing is storing each form field in a survey in its own column. For very long surveys we end up with thousands of elements. 
I know storing in an array is possible but it makes it so much easier to query the data set when each element is in its own field. I had lots of comments on why I should not do this and the possible alternatives and I thank everyone for their input but no one answered the question about compiling with a higher block size to get more columns. Can anyone answer that?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Friday, November 12, 2010 12:24 AM
To: Mark Mitchell
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] More then 1600 columns? 

"Mark Mitchell" <mmitchell(at)riccagroup(dot)com> writes:
> Is there are hard limit of 1600 that you cannot get around?

Yes.

Generally, wanting more than a few dozen columns is a good sign that you
need to rethink your schema design.  What are you trying to accomplish
exactly?

			regards, tom lane


In response to

Responses

pgsql-general by date

Next:From: Mark MitchellDate: 2010-11-12 15:49:04
Subject: Re: More then 1600 columns?
Previous:From: Paul TaylorDate: 2010-11-12 15:27:41
Subject: Can you check in SQL if a fields can be encoded using specified charset

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