mirror of
https://github.com/postgres/postgres.git
synced 2026-04-21 22:28:15 -04:00
Fix bug in pg_dump and psql (to reproduce the bug, just try pg_dump
--nonexistingoption). per report from sugita@sra.co.jp on Thu, 09 May 2002 11:57:51 +0900 (JST) at pgsql-patches list. Illegal long options to pg_dump makes core on some systems, since it lacks the last null sentinel of struct option array. Attached is a patch made by Mr. Ishida Akio <iakio@pjam.jpweb.net>.
This commit is contained in:
parent
77c4ba63b8
commit
964f1fa734
2 changed files with 5 additions and 3 deletions
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.241 2002/02/11 00:18:20 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.241.2.1 2002/05/14 02:08:22 ishii Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -701,7 +701,8 @@ main(int argc, char **argv)
|
|||
* the following options don't have an equivalent short option
|
||||
* letter, but are available as '-X long-name'
|
||||
*/
|
||||
{"use-set-session-authorization", no_argument, &use_setsessauth, 1}
|
||||
{"use-set-session-authorization", no_argument, &use_setsessauth, 1},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int optindex;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.54 2001/11/05 17:46:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.54.2.1 2002/05/14 02:08:22 ishii Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
|
|
@ -361,6 +361,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||
{"expanded", no_argument, NULL, 'x'},
|
||||
{"no-psqlrc", no_argument, NULL, 'X'},
|
||||
{"help", no_argument, NULL, '?'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
int optindex;
|
||||
|
|
|
|||
Loading…
Reference in a new issue