pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Stanaway <david@stanaway.net>
To: Sean Song <seanpssong@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: backup/restore APIs
Date: Fri, 28 Oct 2005 16:01:28 -0500
Message-ID: <1130533288.15621.8.camel@dmxnocws13.dialmex.net> (raw)
In-Reply-To: <20051028135731.26794.qmail@web42007.mail.yahoo.com>
References: <20051028135731.26794.qmail@web42007.mail.yahoo.com>

If your schema is static (Never a safe assumption) you can use the
"COPY ... TO ..." SQL using your preferred client library.

If you want to keep the state of sequences, and changes to the schema
etc, you might be better off using pg_dump. If you want to use that in
your app, it probably wouldn't be too hard to link in the code from
pg_dump. Keep in mind though, that probably has version dependent code
in it as it looks at the system tables, and may be subject to change.

On Fri, 2005-10-28 at 06:57 -0700, Sean Song wrote:
> Hi,
>  
> I want to do backup/restore Postgresql database from my program, but I
> don't want to rely on pg_dump/pg_restore or psql front end tools. Is
> there backup/restore functions in the interface libs for this purpose?
>  
> Thanks,
>  
>  
> pcsps
> 
> ______________________________________________________________________
> Yahoo! FareChase - Search multiple travel sites in one click. 




view thread (3+ messages)  latest in thread

Message-ID: <1130533288.15621.8.camel@dmxnocws13.dialmex.net>
Permalink:  ../1130533288.15621.8.camel@dmxnocws13.dialmex.net/
Also on:    postgresql.org/message-id/1130533288.15621.8.camel@dmxnocws13.dialmex.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: david@stanaway.net, seanpssong@yahoo.com
  Subject: Re: backup/restore APIs
  In-Reply-To: <1130533288.15621.8.camel@dmxnocws13.dialmex.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox