From: Peter Eisentraut <peter_e@gmx.net>
To: dinesh <dinesh@milkorwater.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns
Date: Mon, 06 Jun 2011 13:22:36 +0300
Message-ID: <1307355756.20678.1.camel@fsopti579.F-Secure.com> (raw)
In-Reply-To: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>
References: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>
On lör, 2011-06-04 at 07:09 +0000, dinesh wrote:
> 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.
Yeah, a DROP COLUMN only hides the column and gradually phases it out
from the storage, it doesn't remove it from the metadata storage, which
is where the 1600 limit applies. So that application design is not
going to work.
I find it a bit suspicious that you add a column "for indexing", when
you could perhaps be using an expression index.
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: peter_e@gmx.net, dinesh@milkorwater.com
Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns
In-Reply-To: <1307355756.20678.1.camel@fsopti579.F-Secure.com>
* 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