Help for this page

Select Code to Download


  1. or download this
    create table foo;
    create table foo (id text, name varchar(15));
    ...
    insert into backupfoo (select * from foo);
    delete from foo; -- you would obviously use a WHERE clause to restrict
    + what you are deleting
    >>> 3 records copied
    
  2. or download this
    pg_dump -d  YOURDATABASE -t backupfoo > mybackup.sql
    
  3. or download this
    psql -d YOURDATABASEARCHIVE -f mybackup.sql