Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5397BB5DF46 for ; Tue, 7 Jun 2011 16:02:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 10102-10 for ; Tue, 7 Jun 2011 19:02:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vx0-f174.google.com (mail-vx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id 98B5EB5DF64 for ; Tue, 7 Jun 2011 16:02:32 -0300 (ADT) Received: by vxi39 with SMTP id 39so3806471vxi.19 for ; Tue, 07 Jun 2011 12:02:32 -0700 (PDT) Received: by 10.52.97.161 with SMTP id eb1mr342976vdb.74.1307473351976; Tue, 07 Jun 2011 12:02:31 -0700 (PDT) Received: from tornado.leadboat.com (adsl-98-69-180-225.rmo.bellsouth.net [98.69.180.225]) by mx.google.com with ESMTPS id da4sm108629vdb.33.2011.06.07.12.02.30 (version=SSLv3 cipher=OTHER); Tue, 07 Jun 2011 12:02:31 -0700 (PDT) Date: Tue, 7 Jun 2011 15:02:28 -0400 From: Noah Misch To: dinesh Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600 columns Message-ID: <20110607190228.GA15072@tornado.leadboat.com> References: <201106040709.p5479Roc058117@wwwmaster.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201106040709.p5479Roc058117@wwwmaster.postgresql.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/72 X-Sequence-Number: 30451 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?