diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-21 03:25:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-21 03:25:36 +0000 |
commit | b2e92a712ea7316563c5115639c1e39ad6c5a09b (patch) | |
tree | 6f2a91acddea6238d72599745faa976eff947486 /src/include | |
parent | 2b7206a9935c915155a2c71e4658638de98ad440 (diff) | |
download | postgresql-b2e92a712ea7316563c5115639c1e39ad6c5a09b.tar.gz postgresql-b2e92a712ea7316563c5115639c1e39ad6c5a09b.zip |
Fix getopt-vs-init_ps_display problem by copying original argv[] info,
per suggestion from Peter. Simplify several APIs by transmitting the
original argv location directly from main.c to ps_status.c, instead of
passing it down through several levels of subroutines.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/miscadmin.h | 3 | ||||
-rw-r--r-- | src/include/pgstat.h | 4 | ||||
-rw-r--r-- | src/include/tcop/tcopprot.h | 5 | ||||
-rw-r--r-- | src/include/utils/ps_status.h | 15 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 1257faf0059..70d19f81929 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.93 2001/09/29 04:02:26 tgl Exp $ + * $Id: miscadmin.h,v 1.94 2001/10/21 03:25:35 tgl Exp $ * * NOTES * some of the information in this file should be moved to @@ -121,6 +121,7 @@ extern struct Port *MyProcPort; extern long MyCancelKey; extern char OutputFileName[]; +extern char pg_pathname[]; /* * done in storage/backendid.h for now. diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 0a566e8582e..5295d08ae05 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001, PostgreSQL Global Development Group * - * $Id: pgstat.h,v 1.7 2001/09/03 12:00:00 petere Exp $ + * $Id: pgstat.h,v 1.8 2001/10/21 03:25:36 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -333,7 +333,7 @@ extern bool pgstat_collect_blocklevel; * ---------- */ extern int pgstat_init(void); -extern int pgstat_start(int real_argc, char *real_argv[]); +extern int pgstat_start(void); extern int pgstat_ispgstat(int pid); extern void pgstat_close_sockets(void); extern void pgstat_beterm(int pid); diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index dccea51fe25..ff1bfadf580 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.42 2001/09/07 16:12:49 wieck Exp $ + * $Id: tcopprot.h,v 1.43 2001/10/21 03:25:36 tgl Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -45,8 +45,7 @@ extern void pg_exec_query_string(char *query_string, extern void die(SIGNAL_ARGS); extern void quickdie(SIGNAL_ARGS); extern void authdie(SIGNAL_ARGS); -extern int PostgresMain(int argc, char *argv[], - int real_argc, char *real_argv[], const char *username); +extern int PostgresMain(int argc, char *argv[], const char *username); extern void ResetUsage(void); extern void ShowUsage(void); extern FILE *StatFp; diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h index 9690a156ae1..fb4a52dce41 100644 --- a/src/include/utils/ps_status.h +++ b/src/include/utils/ps_status.h @@ -4,20 +4,21 @@ * * Declarations for backend/utils/misc/ps_status.c * + * $Id: ps_status.h,v 1.20 2001/10/21 03:25:36 tgl Exp $ + * *------------------------------------------------------------------------- */ #ifndef PS_STATUS_H #define PS_STATUS_H -void init_ps_display(int argc, char *argv[], - const char *username, const char *dbname, - const char *host_info); +extern void save_ps_display_args(int argc, char *argv[]); + +extern void init_ps_display(const char *username, const char *dbname, + const char *host_info); -void - set_ps_display(const char *value); +extern void set_ps_display(const char *activity); -const char * - get_ps_display(void); +extern const char *get_ps_display(void); #endif /* PS_STATUS_H */ |