Content-Length: 288429 | pFad | http://github.com/postgrespro/postgres/commit/8344d72cccae699e13884a5705b91dc1c4747c03

A8 Fixes for pg_dump.c regarding multiranges · postgrespro/postgres@8344d72 · GitHub
Skip to content

Commit 8344d72

Browse files
committed
Fixes for pg_dump.c regarding multiranges
This commit fixes two wrong version number checks and one wrong check for null.
1 parent 6df7a96 commit 8344d72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4541,7 +4541,7 @@ binary_upgrade_set_type_oids_by_type_oid(Archive *fout,
45414541
*/
45424542
if (include_multirange_type)
45434543
{
4544-
if (fout->remoteVersion >= 130000)
4544+
if (fout->remoteVersion >= 140000)
45454545
{
45464546
appendPQExpBuffer(upgrade_query,
45474547
"SELECT t.oid, t.typarray "
@@ -8402,7 +8402,7 @@ getCasts(Archive *fout, int *numCasts)
84028402
int i_castcontext;
84038403
int i_castmethod;
84048404

8405-
if (fout->remoteVersion >= 130000)
8405+
if (fout->remoteVersion >= 140000)
84068406
{
84078407
appendPQExpBufferStr(query, "SELECT tableoid, oid, "
84088408
"castsource, casttarget, castfunc, castcontext, "
@@ -10709,7 +10709,7 @@ dumpRangeType(Archive *fout, TypeInfo *tyinfo)
1070910709
appendPQExpBuffer(q, "\n subtype = %s",
1071010710
PQgetvalue(res, 0, PQfnumber(res, "rngsubtype")));
1071110711

10712-
if (PQgetvalue(res, 0, PQfnumber(res, "rngmultitype")))
10712+
if (!PQgetisnull(res, 0, PQfnumber(res, "rngmultitype")))
1071310713
appendPQExpBuffer(q, ",\n multirange_type_name = %s",
1071410714
PQgetvalue(res, 0, PQfnumber(res, "rngmultitype")));
1071510715

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/8344d72cccae699e13884a5705b91dc1c4747c03

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy