Re:

From: John DeSoi <desoi(at)pgedit(dot)com>
To: karim(at)zeecore(dot)net
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re:
Date: 2005-01-21 07:19:10
Message-ID: BE8F7E8D-6B7C-11D9-8C0A-000A95B03262@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Jan 19, 2005, at 7:10 AM, Karim Mardhani wrote:

> 1. How do I programmatically call backup (pg_dump) and vacuum? I am
> using .NET provider as the interface to the postgreSql. I didn't see
> any provision in the .Net provider to invoke these commands. Does
> postgresql support SQL's "BACKUP" and "RESTORE" commands?

I'm not familiar with .net, but I would guess there is a way to execute
command line programs? So you would have to know the location of the
PostgreSQL bin directory (which should be in the registry from the
install) and then call the pg_dump.exe binary. Vacuum is a normal SQL
command which you could call using psql and the -c option.

>
> 2. As part of installation I would like to create and populate a new
> database. What is the easiest way to this? What I am thinking of
> doing
> is to install psql client program and using it to create database. Is
> there any way I don't have to install psql on every client's machine?
>

Same approach as above using initdb.exe and createdb.exe utilities. Or
psql would work as long as you already have a cluster setup.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

  • at 2005-01-19 12:10:26 from Karim Mardhani

Responses

  • Re: at 2005-01-21 11:11:28 from Sean Davis

Browse pgsql-novice by date

  From Date Subject
Next Message Shaun McGuile 2005-01-21 08:09:18 Re: Windows 2000 Pro Error on Install
Previous Message John DeSoi 2005-01-21 05:26:44 Re: Postgresql on windows