Search Postgresql Archives

Re: Is thre a way?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux