Re: [pgsql-admin] "Soft-hitting" the 1600 column limit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nunks <nunks(dot)lol(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [pgsql-admin] "Soft-hitting" the 1600 column limit
Date: 2018-06-06 16:51:56
Message-ID: 12881.1528303916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

nunks <nunks(dot)lol(at)gmail(dot)com> writes:
> I'm trying to support an application in production at work, and for some
> obscure reason the developer made it drop and re-create a column
> periodically.

Not a good idea ...

> I know this is a bad practice (to say the least), and I'm telling them to
> fix it, but after the 1600th drop/add cycle, PostgreSQL starts giving out
> the column limit error:

> ERROR: tables can have at most 1600 columns

Yup. "Dropping" a column just hides it, doesn't make it disappear.
There are a lot of reasons why that's unlikely to change anytime soon.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2018-06-06 16:53:15 Re: [pgsql-admin] "Soft-hitting" the 1600 column limit
Previous Message David G. Johnston 2018-06-06 16:51:15 Re: [pgsql-admin] "Soft-hitting" the 1600 column limit