Re: Read recover rows - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Read recover rows
Date
Msg-id 50CA7472.3090504@gmail.com
Whole thread Raw
In response to Re: Read recover rows  (Alejandro Carrillo <fasterzip@yahoo.es>)
List pgsql-general
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@gmail.com


pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: Re: XML Schema for PostgreSQL database
Next
From: "Kevin Grittner"
Date:
Subject: Re: pg_restore error with out of memory