diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-11-06 22:18:10 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-11-06 22:18:10 +0000 |
commit | 306c44eeadc9e33f415ff011f254b0527edfa88d (patch) | |
tree | d9f6a2d9250f4d169af38fae8b9af349bbd88f34 /src/backend/tcop/postgres.c | |
parent | 6f2f1690156d4815a40977f900f098af4f745086 (diff) | |
download | postgresql-306c44eeadc9e33f415ff011f254b0527edfa88d.tar.gz postgresql-306c44eeadc9e33f415ff011f254b0527edfa88d.zip |
Add -V option to backend, to show version, since --version doesn't seem
to work everywhere. Also, on FreeBSD you need to set the optreset variable
to 1 before parsing the command line a second time with getopt().
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 29192686e6c..3a6cc57d3d8 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.185 2000/11/04 12:43:24 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.186 2000/11/06 22:18:08 petere Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1112,7 +1112,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha optind = 1; /* reset after postmaster's usage */ - while ((flag = getopt(argc, argv, "A:B:CD:d:Eef:FiLNOPo:p:S:st:v:W:x:-:?")) != EOF) + while ((flag = getopt(argc, argv, "A:B:CD:d:Eef:FiLNOPo:p:S:st:v:VW:x:-:?")) != EOF) switch (flag) { case 'A': @@ -1338,6 +1338,10 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha FrontendProtocol = (ProtocolVersion) atoi(optarg); break; + case 'V': + puts("postgres (PostgreSQL) " PG_VERSION); + exit(0); + case 'W': /* ---------------- * wait N seconds to allow attach from a debugger @@ -1635,7 +1639,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.185 $ $Date: 2000/11/04 12:43:24 $\n"); + puts("$Revision: 1.186 $ $Date: 2000/11/06 22:18:08 $\n"); } /* |