aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/dumputils.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-03-26 15:21:57 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-03-26 15:32:02 +0200
commit901b89e37bb8e71224ee76987679010ff3c93c05 (patch)
tree53e8156f6a64650c34c01f3de722ab540b613c5f /src/bin/pg_dump/dumputils.c
parentec143f94051779bb5d07419723529b4cc4fcce95 (diff)
downloadpostgresql-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/dumputils.c')
-rw-r--r--src/bin/pg_dump/dumputils.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 7322f1a8257..31e56ef7fb5 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -457,29 +457,6 @@ appendByteaLiteral(PQExpBuffer buf, const unsigned char *str, size_t length,
/*
- * Convert backend's version string into a number.
- */
-int
-parse_version(const char *versionString)
-{
- int cnt;
- int vmaj,
- vmin,
- vrev;
-
- cnt = sscanf(versionString, "%d.%d.%d", &vmaj, &vmin, &vrev);
-
- if (cnt < 2)
- return -1;
-
- if (cnt == 2)
- vrev = 0;
-
- return (100 * vmaj + vmin) * 100 + vrev;
-}
-
-
-/*
* Deconstruct the text representation of a 1-dimensional Postgres array
* into individual items.
*