Search Postgresql Archives

Re: Read recover rows

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

 



On 12/13/2012 03:41 PM, Alejandro Carrillo wrote:
Are you trying to recover a table by copying in a table from somewhere
else? Yes because I can't modify the original file

You will not be able to work with the disk file directly, you will need to go through the database.

Have you tried pg_dump:

http://www.postgresql.org/docs/9.2/interactive/app-pgdump.html

Something like:

pg_dump -t some_table -f some_table.sql -U some_user  database_name

Where the dummy names are replaced with the table/database you want.

This will create a plain text file. If you need to change the name you could do find and replace on the table name.


This assumes you are trying to move a user created table not a system table.
Is that the case?


--
Adrian Klaver
adrian.klaver@xxxxxxxxx


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