Re: Undropping a column?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Greg Stark <gsstark(at)MIT(dot)EDU>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Undropping a column?
Date: 2003-12-01 19:11:47
Message-ID: 87llpwcpzg.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Stark <gsstark(at)MIT(dot)EDU> writes:

> I just dropped a column that I wish I hadn't. Is there some simple update i
> could do to the pg_* tables that would undrop it? I haven't done any other
> updates though autovacuum may have run.

Ok, I seem to have done it with this:

update pg_attribute set attisdropped = 'f',atttypid= 25
where attrelid = 17839 and attname = '........pg.dropped.9........';

I've now updated the table to copy this data over to the new column and
redropped the old column. Have I messed up my database?

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-01 19:13:06 Re: Undropping a column?
Previous Message B. van Ouwerkerk 2003-12-01 19:11:35 Re: PostgreSQL from a newcomers perspective