Converting Copy to insert statement in backup file

From: "Chris Preston" <chris(at)thetrafalgartravel(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Converting Copy to insert statement in backup file
Date: 2008-07-10 15:40:17
Message-ID: 200807101540.m6AFeA3T025524@mail2.trafalgar.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I have a backup cron job (shown below) but its too big and there are times
that I want to just cut out from the text file certain areas to restore data
in a specific table. Looking in the file, I notice there is a "copy"
command.. Someone told me that there was a parameter that I could use to
convert the copy to insert so I could easily cut it out of the file and run
it on its own ..Any ideas

su -c '/usr/bin/pg_dump -U postgres -o -C ttms |gzip >
/home/hrd/ttmsqltrams/sqlbackup.gz' postgres

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-07-10 15:44:19 Re: Converting Copy to insert statement in backup file
Previous Message Scott Marlowe 2008-07-10 14:48:20 Re: i can't connect after some periode