diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-03-26 15:21:57 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-03-26 15:32:02 +0200 |
commit | 901b89e37bb8e71224ee76987679010ff3c93c05 (patch) | |
tree | 53e8156f6a64650c34c01f3de722ab540b613c5f /src/bin/pg_dump/pg_dump.c | |
parent | ec143f94051779bb5d07419723529b4cc4fcce95 (diff) | |
download | postgresql-901b89e37bb8e71224ee76987679010ff3c93c05.tar.gz postgresql-901b89e37bb8e71224ee76987679010ff3c93c05.zip |
Get rid of obsolete parse_version helper function.
For getting the server's version in numeric form, use PQserverVersion().
It does the exact same parsing as dumputils.c's parse_version(), and has
been around in libpq for a long time. For the client's version, just use
the PG_VERSION_NUM constant.
Diffstat (limited to 'src/bin/pg_dump/pg_dump.c')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index b50e5406228..771822dab5d 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -295,7 +295,6 @@ main(int argc, char **argv) int outputNoOwner = 0; char *outputSuperuser = NULL; char *use_role = NULL; - int my_version; int optindex; RestoreOptions *ropt; ArchiveFormat archiveFormat = archUnknown; @@ -620,16 +619,12 @@ main(int argc, char **argv) /* Let the archiver know how noisy to be */ fout->verbose = g_verbose; - my_version = parse_version(PG_VERSION); - if (my_version < 0) - exit_horribly(NULL, "could not parse version string \"%s\"\n", PG_VERSION); - /* * We allow the server to be back to 7.0, and up to any minor release of * our own major version. (See also version check in pg_dumpall.c.) */ fout->minRemoteVersion = 70000; - fout->maxRemoteVersion = (my_version / 100) * 100 + 99; + fout->maxRemoteVersion = (PG_VERSION_NUM / 100) * 100 + 99; fout->numWorkers = numWorkers; |