Re: Undropping a column?

Поиск
Список
Период
Сортировка
От Alex Satrapa
Тема Re: Undropping a column?
Дата
Msg-id 3FCBB9AF.4020908@lintelsys.com.au
обсуждение исходный текст
Ответ на Re: Undropping a column?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> 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?

You could rsync the database back from your live off-site backup, or
rifle through the piles of backups to recover from last night's archive
backup :)

Another alternative, if it's just the schema not the data you need back,
is simply to "alter table add column ..." the column back.  Note that if
you want it to be "not null" or "default x" you have to add the column,
update the table with the default value in each column, alter the column
to be not null then alter the column to be default x.

Though this probably isn't what you were looking for, it's still on the
archives for someone else to stumble across c/o Google

Alex



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

Предыдущее
От: "Rick Gigger"
Дата:
Сообщение: Re: Large objects [BLOB] again - general howto
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: perl(Pg) (S)RPM