Re: Is thre a way?

Поиск
Список
Период
Сортировка
От Anderson dos Santos Donda
Тема Re: Is thre a way?
Дата
Msg-id ad072ae30905070829t78ee6c1drce35eb7133f74b5d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is thre a way?  (Jasen Betts <jasen@xnet.co.nz>)
Список pgsql-general
My backup is PLAIN(text) format... i'll try to do with sed...

Thanks for all o/

On Thu, May 7, 2009 at 9:14 AM, Jasen Betts <jasen@xnet.co.nz> wrote:
On 2009-05-06, Anderson dos Santos Donda <andersondonda@gmail.com> wrote:
> --0021cc022382dbd1bb0469443c6e
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> Hi o/
>
> I have a table with 2000 names and emails.. and I did UPDATE list SET email
>= '' without the WHERE and now all rows is null in column email..
>
>
> I have a backup made with pg_dump.. is there a way to restore only the email
> data?

what format of pg_dump?

If a binary dump use pg_restore to restore the table you want to a
scratch database then use dblink or copy to get that into a temp table
in the database you want.

If a text dump use sed (or an interactive editor) to extract the table
data you want, load it into a temp table

finally do an
UPDATE ... FROM ....
to fix the losses.

I had to do this a few months ago.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Rob W
Дата:
Сообщение: Optimizing tuning and table design for large analytics DB
Следующее
От: Conrad Lender
Дата:
Сообщение: Re: "No transaction in progress" warning