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

Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600columns

From: Noah Misch <noah(at)leadboat(dot)com>
To: dinesh <dinesh(at)milkorwater(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6052: ADD COLUMN - ERROR: tables can have at most 1600columns
Date: 2011-06-07 19:02:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
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?

In response to

pgsql-bugs by date

Next:From: Robert HaasDate: 2011-06-07 19:05:13
Subject: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Previous:From: Anton DedovDate: 2011-06-07 18:15:27
Subject: Re: ON DELETE CASCADE with multiple paths in PostgreSQL 9.x

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