diff options
author | Marc G. Fournier <scrappy@hub.org> | 1996-07-27 04:38:22 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1996-07-27 04:38:22 +0000 |
commit | 64b130a8e73018972dab3df9e5ef42646ee9a68d (patch) | |
tree | d6801a11d0c9b7d3f2e34f008f396b54b7242548 | |
parent | edb519b14c4d54daeb23ac6f06b9676a6d4bf702 (diff) | |
download | postgresql-64b130a8e73018972dab3df9e5ef42646ee9a68d.tar.gz postgresql-64b130a8e73018972dab3df9e5ef42646ee9a68d.zip |
Various fixes required for psql
Submitted by: Bruce
-rw-r--r-- | src/bin/psql/psql.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 4854050e339..40c36036b3f 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.9 1996/07/27 02:55:11 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.10 1996/07/27 04:38:22 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -1111,10 +1111,10 @@ main(int argc, char** argv) extern char* optarg; extern int optind; - char* dbname = (char *)NULL; - char* host = (char *)NULL; - char* port = (char *)NULL; - char* qfilename = (char *)NULL; + char* dbname = NULL; + char* host = NULL; + char* port = NULL; + char* qfilename = NULL; char errbuf[ERROR_MSG_LENGTH]; PsqlSettings settings; @@ -1148,19 +1148,19 @@ main(int argc, char** argv) fe_setauthsvc(optarg, errbuf); break; case 'c': - singleQuery = optarg; + singleQuery = dupstr(optarg); if ( singleQuery[0] == '\\' ) { singleSlashCmd=1; } break; case 'd': - dbname = optarg; + dbname = dupstr(optarg); break; case 'e': settings.echoQuery = 1; break; case 'f': - qfilename = optarg; + qfilename = dupstr(optarg); break; case 'F': settings.opt.fieldSep=dupstr(optarg); @@ -1169,7 +1169,7 @@ main(int argc, char** argv) listDatabases = 1; break; case 'h': - host = optarg; + host = dupstr(optarg); break; case 'H': settings.opt.html3 = 1; @@ -1181,7 +1181,7 @@ main(int argc, char** argv) setFout(&settings, optarg); break; case 'p': - port = optarg; + port = dupstr(optarg); break; case 'q': settings.quiet = 1; |