Re: Undropping a column?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Undropping a column?
Дата
Msg-id 25371.1070305986@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Undropping a column?  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Undropping a column?
Список 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?

Lessee ... unset 'attisdropped', put attname back the way you want,
restore atttype to the right thing.  You'll need to restore any
constraints, default value, etc as well.

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Undropping a column?
Следующее
От: "B. van Ouwerkerk"
Дата:
Сообщение: Re: PostgreSQL from a newcomers perspective