Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8344d72

Browse filesBrowse 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
Copy full SHA for 8344d72

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/bin/pg_dump/pg_dump.c

Copy file name to clipboardExpand all lines: src/bin/pg_dump/pg_dump.c
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.