Move connect.h from fe_utils to src/include/common.
authorNoah Misch <noah@leadboat.com>
Mon, 10 Aug 2020 16:22:54 +0000 (09:22 -0700)
committerNoah Misch <noah@leadboat.com>
Mon, 10 Aug 2020 16:22:54 +0000 (09:22 -0700)
Any libpq client can use the header.  Clients include backend components
postgres_fdw, dblink, and logical replication apply worker.  Back-patch
to v10, because another fix needs this.  In released branches, just copy
the header and keep the original.

14 files changed:
contrib/oid2name/oid2name.c
contrib/vacuumlo/vacuumlo.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_rewind/libpq_fetch.c
src/bin/pg_upgrade/server.c
src/bin/scripts/common.c
src/bin/scripts/reindexdb.c
src/bin/scripts/vacuumdb.c
src/fe_utils/cancel.c
src/include/common/connect.h [moved from src/include/fe_utils/connect.h with 96% similarity]
src/tools/findoidjoins/findoidjoins.c

index c7d0f9025a43fcdedcaf8090d13e0fd63849d54c..91b7958c48efa0bef027688a4b5651fc62faf3ad 100644 (file)
@@ -10,8 +10,8 @@
 #include "postgres_fe.h"
 
 #include "catalog/pg_class_d.h"
+#include "common/connect.h"
 #include "common/logging.h"
-#include "fe_utils/connect.h"
 #include "getopt_long.h"
 #include "libpq-fe.h"
 #include "pg_getopt.h"
index 92bdf71356b1f9c003c02b6291c10750188b9ba5..e4019fafaa9e7cc5d2ce1415d57089dd4b988082 100644 (file)
@@ -22,8 +22,8 @@
 #endif
 
 #include "catalog/pg_class_d.h"
+#include "common/connect.h"
 #include "common/logging.h"
-#include "fe_utils/connect.h"
 #include "getopt_long.h"
 #include "libpq-fe.h"
 #include "pg_getopt.h"
index 410116492ea1fcd79b0ad02e2bb8b30aefb637cd..c08003e7f2c75e209bef60f7dd4fa4d961c2221e 100644 (file)
 #include <unistd.h>
 
 #include "access/xlog_internal.h"
+#include "common/connect.h"
 #include "common/fe_memutils.h"
 #include "common/file_perm.h"
 #include "common/logging.h"
 #include "datatype/timestamp.h"
-#include "fe_utils/connect.h"
 #include "port/pg_bswap.h"
 #include "pqexpbuffer.h"
 #include "receivelog.h"
index 6dba7e19e433da869ac074798d4a0c66c418a090..94af11b80a398834d1f9a651941c7b01fb412905 100644 (file)
@@ -17,8 +17,8 @@
 #include <termios.h>
 #endif
 
+#include "common/connect.h"
 #include "dumputils.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 #include "parallel.h"
 #include "pg_backup_archiver.h"
index 94459b3539ad4443327ac3a85884c00a68720662..9c8436dde6cc195a31725f9291b4c89b93b45cfd 100644 (file)
@@ -52,8 +52,8 @@
 #include "catalog/pg_proc_d.h"
 #include "catalog/pg_trigger_d.h"
 #include "catalog/pg_type_d.h"
+#include "common/connect.h"
 #include "dumputils.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 #include "getopt_long.h"
 #include "libpq/libpq-fs.h"
index 8d548491023179bef4c2847b3a6c2e6c324818bc..2c82b39af0d27bdae33eae3c336d7126ccf4e6c2 100644 (file)
 #include <time.h>
 #include <unistd.h>
 
+#include "common/connect.h"
 #include "common/file_utils.h"
 #include "common/logging.h"
 #include "dumputils.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 #include "getopt_long.h"
 #include "pg_backup.h"
index c44648f82318c8a0156977a3c06d222a3b644855..bf4dfc23b963dde43cf4d4d806b3a985fd2aa643 100644 (file)
@@ -15,8 +15,8 @@
 #include <unistd.h>
 
 #include "catalog/pg_type_d.h"
+#include "common/connect.h"
 #include "datapagemap.h"
-#include "fe_utils/connect.h"
 #include "fetch.h"
 #include "file_ops.h"
 #include "filemap.h"
index 79ec3f04c0ecda67f80c2cb096f06e0e1767cc0c..7db3c1d51f2e241768b7c13afeac41840e7b24f8 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "postgres_fe.h"
 
-#include "fe_utils/connect.h"
+#include "common/connect.h"
 #include "fe_utils/string_utils.h"
 #include "pg_upgrade.h"
 
index ee65cc39481a38fc7c0cf2bc6689fce873013a16..420d0d11a5a1595212fdf916374a51eb39d5dcc1 100644 (file)
@@ -18,9 +18,9 @@
 #include <unistd.h>
 
 #include "common.h"
+#include "common/connect.h"
 #include "common/logging.h"
 #include "fe_utils/cancel.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 
 #define ERRCODE_UNDEFINED_TABLE  "42P01"
index b7b19ccc1ca9c2457ebca08130b2915582021996..40dcbc928332416f0fb7e11431be6612ecb55271 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "catalog/pg_class_d.h"
 #include "common.h"
+#include "common/connect.h"
 #include "common/logging.h"
 #include "fe_utils/cancel.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/simple_list.h"
 #include "fe_utils/string_utils.h"
 #include "scripts_parallel.h"
index 6a3c941158fb76bff2432f4dc9f1dba01ae8280d..125ed2ff5a46d018ca778dc23ef5836d4e7c5382 100644 (file)
@@ -15,9 +15,9 @@
 #include "catalog/pg_class_d.h"
 
 #include "common.h"
+#include "common/connect.h"
 #include "common/logging.h"
 #include "fe_utils/cancel.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/simple_list.h"
 #include "fe_utils/string_utils.h"
 #include "scripts_parallel.h"
index 51fb67d384adb02da169fcf39279b76b8e96d4bb..70042017481a77a7ceda12cd6e30ddb92f7bbe64 100644 (file)
@@ -18,8 +18,8 @@
 
 #include <unistd.h>
 
+#include "common/connect.h"
 #include "fe_utils/cancel.h"
-#include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 
 
similarity index 96%
rename from src/include/fe_utils/connect.h
rename to src/include/common/connect.h
index 8030af9a9f8b6b503fcec3bb6a314a9c3ad6acad..2cc5d7dd251b58c5de0f77e48787294b6ce6229a 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/fe_utils/connect.h
+ * src/include/common/connect.h
  *
  *-------------------------------------------------------------------------
  */
index 5239332ea7eefd0e8e7895e2f230ec828de2a1c0..3d9ca262357653d19597f8858067a6bcb289148a 100644 (file)
@@ -10,7 +10,7 @@
 #include "access/transam.h"
 #include "catalog/pg_class_d.h"
 
-#include "fe_utils/connect.h"
+#include "common/connect.h"
 #include "libpq-fe.h"
 #include "pqexpbuffer.h"