1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add -U and -W options to pg_dump and friends to support non-interactive

specification of username (like in psql).  pg_dumpall now works with
password authentication.
This commit is contained in:
Peter Eisentraut
2001-05-17 21:12:49 +00:00
parent 761a0bb69b
commit f000ffd28e
11 changed files with 269 additions and 153 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.11 2001/04/25 07:03:19 pjw Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.12 2001/05/17 21:12:48 petere Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
@ -114,6 +114,7 @@ typedef struct _restoreOptions
char *dbname;
char *pgport;
char *pghost;
char *username;
int ignoreVersion;
int requirePassword;
@ -130,12 +131,16 @@ typedef struct _restoreOptions
extern void exit_horribly(Archive *AH, const char *fmt,...);
extern char *
simple_prompt(const char *prompt, int maxlen, bool echo);
/* Lets the archibe know we have a DB connection to shutdown if it dies */
PGconn *ConnectDatabase(Archive *AH,
const char *dbname,
const char *pghost,
const char *pgport,
const char *username,
const int reqPwd,
const int ignoreVersion);