Re: pg_dump

From: Frank Finner <postgresql(at)finner(dot)de>
To: "Viorel Dragomir" <bigchief(at)vio(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump
Date: 2003-07-25 20:20:38
Message-ID: 20030725222038.0a6f5b1c.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

with PostgreSQL you can do it using the environment variables PGUSER and
PGPASSWORD for example in a shellscript like this (bash-syntax):

#!/bin/bash
export PGUSER=customer
export PGPASSWORD=sdds9087c
pg_dump mybigdatabase

or all in one line (eg as content of a system command in PHP):

PGUSER=customer PGPASSWORD=sdds9087c pg_dump mybigdatabase

mfg Frank Finner

On Wed, 16 Jul 2003 11:48:29 +0300 "Viorel Dragomir" <bigchief(at)vio(dot)ro>
sat down, thought long and then wrote:

> Is there a way to dump all database contents using pg_dump for a
> custom user. Something like:
> pg_dump --user=user_name --password=password database
> where user_name is any user granted to access this database with all
> the rights.
>
> The problem is pg_dump has an option --password, but it's interactive
> and i need to launch the command from a php script.
>
> thx.
>
> Note that mysqldump has this kind of options.

Maybe, but a lot of other options are missing in that database engine.

In response to

  • pg_dump at 2003-07-16 08:48:29 from Viorel Dragomir

Responses

  • Re: pg_dump at 2003-07-25 21:17:26 from Andrew Sullivan

Browse pgsql-general by date

  From Date Subject
Next Message Heath Tanner 2003-07-25 20:22:15 Re: Using YY-MM-DD date input
Previous Message Elielson Fontanezi 2003-07-25 20:20:15 RES: ERROR: DefineIndex: index function must be marked iscachable