pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dinesh <dinesh@milkorwater.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns
Date: Sat, 4 Jun 2011 07:09:27 GMT
Message-ID: <201106040709.p5479Roc058117@wwwmaster.postgresql.org> (raw)


The following bug has been logged online:

Bug reference:      6052
Logged by:          dinesh
Email address:      dinesh@milkorwater.com
PostgreSQL version: 8.4.7
Operating system:   WIndows 7 pro 64 bit
Description:        ADD COLUMN - ERROR: tables can have at most 1600 columns
Details: 

I have a table which is used during data uploads, a so-called staging table.
This table has a fixed number of columns that [must] match the input CSV
file. This CSV file is uploaded using COPY command. Following the COPY, a
new column (meant for indexing) is constructed on this table using some
application logic; and dropped after that data upload cycle is over.

After some 1500+ cycles, I get the following error:

ERROR: tables can have at most 1600 columns
SQL state: 54011
Context: SQL statement "ALTER TABLE stage_fo ADD COLUMN exch_ticker char
varying"

So it appears that the command
ALTER TABLE stage_fo DROP COLUMN exch_ticker
is only producing some soft effects, not sufficient for the db engine.

There was a similar problem mentioned by another user, Ron St-Pierre, in
June 2004
(http://bytes.com/topic/postgresql/answers/422107-error-tables-can-have-most
-1600-columns). Suggestion made there - to drop/rebuild the table - is not a
trivial choice.

I will appreciate any helpful pointers that will get us past this
showstopper. Rewrite is going to be expensive.

Thanks & regards
Dinesh
Dinesh



view thread (6+ messages)  latest in thread

Message-ID: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>
Permalink:  ../201106040709.p5479Roc058117@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201106040709.p5479Roc058117@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: dinesh@milkorwater.com
  Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns
  In-Reply-To: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox