Re: stupid patch of pg_dumplo - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: stupid patch of pg_dumplo |
Date | |
Msg-id | 200202222005.g1MK5aO14333@candle.pha.pa.us Whole thread Raw |
In response to | stupid patch of pg_dumplo (andrea gelmini <bungle@linux.it>) |
Responses |
Re: stupid patch of pg_dumplo
|
List | pgsql-patches |
Your patch has been added to the PostgreSQL unapplied patches list at: http://candle.pha.pa.us/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --------------------------------------------------------------------------- andrea gelmini wrote: > hi all, > i would like to se this patch applied, because i often use > pg_dumplo, and i need to set the port number of the server to contact. > anyway, i don't have C language skill, so be careful with these > lines... they work for me, but... > > thanks for your time, > andrea gelmini > > *** contrib/pg_dumplo/main.c Thu Nov 8 13:36:14 2001 > --- contrib/pg_dumplo/mio Thu Nov 8 13:50:56 2001 > *************** > *** 31,39 **** > > extern int errno; > > ! char *progname = NULL; > > ! int main(int argc, char **argv); > static void usage(void); > static void parse_lolist(LODumpMaster * pgLO); > > --- 31,40 ---- > > extern int errno; > > ! char *progname = NULL; > ! char *pgport = NULL; > > ! int main(int argc, char **argv); > static void usage(void); > static void parse_lolist(LODumpMaster * pgLO); > > *************** > *** 81,86 **** > --- 82,88 ---- > {"pwd", required_argument, 0, 'p'}, > {"db", required_argument, 0, 'd'}, > {"host", required_argument, 0, 'h'}, > + {"port", required_argument, 0, 'o'}, > {"space", required_argument, 0, 's'}, > {"import", no_argument, 0, 'i'}, > {"export", no_argument, 0, 'e'}, > *************** > *** 91,100 **** > {NULL, 0, 0, 0} > }; > > ! while ((arg = getopt_long(argc, argv, "?aehu:p:qd:l:t:irs:w", l_opt, &l_index)) != -1) > { > #else > ! while ((arg = getopt(argc, argv, "?aehu:p:qd:l:t:irs:w")) != -1) > { > #endif > switch (arg) > --- 93,102 ---- > {NULL, 0, 0, 0} > }; > > ! while ((arg = getopt_long(argc, argv, "?aehou:p:qd:l:t:irs:w", l_opt, &l_index)) != -1) > { > #else > ! while ((arg = getopt(argc, argv, "?aehou:p:qd:l:t:irs:w")) != -1) > { > #endif > switch (arg) > *************** > *** 118,123 **** > --- 120,128 ---- > case 's': > pgLO->space = strdup(optarg); > break; > + case 'o': > + pgport = optarg; > + break; > case 'i': > pgLO->action = ACTION_IMPORT; > break; > *************** > *** 173,179 **** > /* > * Make connection > */ > ! pgLO->conn = PQsetdbLogin(pgLO->host, NULL, NULL, NULL, pgLO->db, > pgLO->user, pwd); > > if (PQstatus(pgLO->conn) == CONNECTION_BAD) > --- 178,184 ---- > /* > * Make connection > */ > ! pgLO->conn = PQsetdbLogin(pgLO->host, pgport, NULL, NULL, pgLO->db, > pgLO->user, pwd); > > if (PQstatus(pgLO->conn) == CONNECTION_BAD) > *************** > *** 279,284 **** > --- 284,290 ---- > "-p --password=<password> password for connection to server\n" > "-d --db=<database> database name\n" > "-t --host=<hostname> server hostname\n" > + "-o --port=<port> database server port (default: 5432)\n" > "-s --space=<dir> directory with dump tree (for export/import)\n" > "-i --import import large obj dump tree to DB\n" > "-e --export export (dump) large obj to dump tree\n" > *************** > *** 295,300 **** > --- 301,307 ---- > "-p <password> password for connection to server\n" > "-d <database> database name\n" > "-t <hostname> server hostname\n" > + "-o <port> database server port (default: 5432)\n" > "-s <dir> directory with dump tree (for export/import)\n" > "-i import large obj dump tree to DB\n" > "-e export (dump) large obj to dump tree\n" > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
pgsql-patches by date: