Re: Is thre a way?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Anderson dos Santos Donda <andersondonda(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is thre a way?
Date: 2009-05-06 20:34:37
Message-ID: 4A01F45D.5000309@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/05/2009 21:28, Anderson dos Santos Donda wrote:

> 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..

<pedant mode>
They're not null, they're just filled with empty strings.... :-)
</pedant mode>

> I have a backup made with pg_dump.. is there a way to restore only
> the email data?

If the backup is in PLAIN (text) format, you can copy-and-paste the
relevant bits into a new script, and run that through psql.

If it's in one of the binary formats, I think pg_restore lets you choose
which objects you want to restore.

Either way, you ought to be OK. You may find it easiest to drop the
table first, restore it from the backup, and then restore any foreign
key dependencies.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

  • Is thre a way? at 2009-05-06 20:28:26 from Anderson dos Santos Donda

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-05-06 20:46:48 Re: [GENERAL] how to select temp table
Previous Message Dann Corbit 2009-05-06 20:31:09 Re: Is thre a way?