Re: Undropping a column?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Undropping a column?
Дата
Msg-id 87llpwcpzg.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Undropping a column?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark <gsstark@MIT.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Jonathan Bartlett
Дата:
Сообщение: Re: PostgreSQL from a newcomers perspective
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Undropping a column?