pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
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: Tue, 7 Jun 2011 15:02:28 -0400
Message-ID: <20110607190228.GA15072@tornado.leadboat.com> (raw)
In-Reply-To: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>
References: <201106040709.p5479Roc058117@wwwmaster.postgresql.org>

On Sat, Jun 04, 2011 at 07:09:27AM +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.

When you provide a column list to the COPY command, the table's columns need not
exactly match the input CSV structure.  Could you leave that extra column there
all the time, omit it from your column list in the COPY command, and have a
trigger or default value expression populate it during the COPY?



view thread (6+ messages)  latest in thread

Message-ID: <20110607190228.GA15072@tornado.leadboat.com>
Permalink:  ../20110607190228.GA15072@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20110607190228.GA15072@tornado.leadboat.com

 · 

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: noah@leadboat.com, dinesh@milkorwater.com
  Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns
  In-Reply-To: <20110607190228.GA15072@tornado.leadboat.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