Add missing include to pg_upgrade/version.c
authorTomas Vondra <[email protected]>
Wed, 16 Oct 2019 14:08:40 +0000 (16:08 +0200)
committerTomas Vondra <[email protected]>
Wed, 16 Oct 2019 14:23:09 +0000 (16:23 +0200)
Commit 8d48e6a724 uses RELKIND_ constants when building the query, but
did not include the header defining them. On 10+ this header is already
included, but on 9.6 and earlier it was missing. It compiles just fine,
but then fails during execution

  ERROR:  column "relkind_relation" does not exist

Fix by adding the necessary header file, and backpatch to 9.4-.

Backpatch-to: 9.4-
Discussion: https://postgr.es/m/16045-673e8fa6b5ace196%40postgresql.org

src/bin/pg_upgrade/version.c

index b0c0132dc70949ec85580e55cd9b3073c1c623c4..3a9f2afa79385b4a2165f5ca18b119b89671b90a 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "pg_upgrade.h"
 
+#include "catalog/pg_class.h"
 
 
 /*