summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Korotkov2020-12-20 05:14:35 +0000
committerAlexander Korotkov2020-12-20 05:14:35 +0000
commit8344d72cccae699e13884a5705b91dc1c4747c03 (patch)
tree8aff8291975298fef5dd4b7877b1bbdb1afbbd01
parent6df7a9698bb036610c1e8c6d375e1be38cb26d5f (diff)
Fixes for pg_dump.c regarding multiranges
This commit fixes two wrong version number checks and one wrong check for null.
-rw-r--r--src/bin/pg_dump/pg_dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 03023a382c0..8b1e5cc2b59 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -4541,7 +4541,7 @@ binary_upgrade_set_type_oids_by_type_oid(Archive *fout,
*/
if (include_multirange_type)
{
- if (fout->remoteVersion >= 130000)
+ if (fout->remoteVersion >= 140000)
{
appendPQExpBuffer(upgrade_query,
"SELECT t.oid, t.typarray "
@@ -8402,7 +8402,7 @@ getCasts(Archive *fout, int *numCasts)
int i_castcontext;
int i_castmethod;
- if (fout->remoteVersion >= 130000)
+ if (fout->remoteVersion >= 140000)
{
appendPQExpBufferStr(query, "SELECT tableoid, oid, "
"castsource, casttarget, castfunc, castcontext, "
@@ -10709,7 +10709,7 @@ dumpRangeType(Archive *fout, TypeInfo *tyinfo)
appendPQExpBuffer(q, "\n subtype = %s",
PQgetvalue(res, 0, PQfnumber(res, "rngsubtype")));
- if (PQgetvalue(res, 0, PQfnumber(res, "rngmultitype")))
+ if (!PQgetisnull(res, 0, PQfnumber(res, "rngmultitype")))
appendPQExpBuffer(q, ",\n multirange_type_name = %s",
PQgetvalue(res, 0, PQfnumber(res, "rngmultitype")));