aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-03-03 11:23:33 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-03-03 11:23:33 -0500
commita351679c806ec9591ef4aaf5534d642e35140b9d (patch)
treed9127992a66548251df21fd24cc3c7883e65c8fe
parent506652bcaea74a23d6f0a33923a7f558126b472d (diff)
downloadpostgresql-a351679c806ec9591ef4aaf5534d642e35140b9d.tar.gz
postgresql-a351679c806ec9591ef4aaf5534d642e35140b9d.zip
Trivial adjustments in preparation for bootstrap data conversion.
Rationalize a couple of macro names: * In catalog/pg_init_privs.h, rename Anum_pg_init_privs_privs to Anum_pg_init_privs_initprivs to match the column's actual name. * In ecpg, rename ZPBITOID to BITOID to match catalog/pg_type.h. This reduces reader confusion, and will allow us to generate these macros automatically in future. In catalog/pg_tablespace.h, fix the ordering of related DATA and #define lines to agree with how it's done elsewhere. This has no impact today, but simplifies life for the bootstrap data conversion scripts. John Naylor Discussion: https://postgr.es/m/CAJVSVGXnLH=BSo0x-aA818f=MyQqGS5nM-GDCWAMdnvQJTRC1A@mail.gmail.com
-rw-r--r--src/backend/catalog/aclchk.c6
-rw-r--r--src/include/catalog/pg_init_privs.h2
-rw-r--r--src/include/catalog/pg_tablespace.h3
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/pg_type.h2
5 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 3f2c629c472..06485397969 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -5969,8 +5969,8 @@ recordExtensionInitPrivWorker(Oid objoid, Oid classoid, int objsubid, Acl *new_a
MemSet(nulls, false, sizeof(nulls));
MemSet(replace, false, sizeof(replace));
- values[Anum_pg_init_privs_privs - 1] = PointerGetDatum(new_acl);
- replace[Anum_pg_init_privs_privs - 1] = true;
+ values[Anum_pg_init_privs_initprivs - 1] = PointerGetDatum(new_acl);
+ replace[Anum_pg_init_privs_initprivs - 1] = true;
oldtuple = heap_modify_tuple(oldtuple, RelationGetDescr(relation),
values, nulls, replace);
@@ -6007,7 +6007,7 @@ recordExtensionInitPrivWorker(Oid objoid, Oid classoid, int objsubid, Acl *new_a
values[Anum_pg_init_privs_privtype - 1] =
CharGetDatum(INITPRIVS_EXTENSION);
- values[Anum_pg_init_privs_privs - 1] = PointerGetDatum(new_acl);
+ values[Anum_pg_init_privs_initprivs - 1] = PointerGetDatum(new_acl);
tuple = heap_form_tuple(RelationGetDescr(relation), values, nulls);
diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h
index 6ea005fdebf..65f02c2aefe 100644
--- a/src/include/catalog/pg_init_privs.h
+++ b/src/include/catalog/pg_init_privs.h
@@ -69,7 +69,7 @@ typedef FormData_pg_init_privs * Form_pg_init_privs;
#define Anum_pg_init_privs_classoid 2
#define Anum_pg_init_privs_objsubid 3
#define Anum_pg_init_privs_privtype 4
-#define Anum_pg_init_privs_privs 5
+#define Anum_pg_init_privs_initprivs 5
/*
* It is important to know if the initial privileges are from initdb or from an
diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h
index 39670566499..360fc4c0cc4 100644
--- a/src/include/catalog/pg_tablespace.h
+++ b/src/include/catalog/pg_tablespace.h
@@ -58,9 +58,8 @@ typedef FormData_pg_tablespace *Form_pg_tablespace;
#define Anum_pg_tablespace_spcoptions 4
DATA(insert OID = 1663 ( pg_default PGUID _null_ _null_ ));
-DATA(insert OID = 1664 ( pg_global PGUID _null_ _null_ ));
-
#define DEFAULTTABLESPACE_OID 1663
+DATA(insert OID = 1664 ( pg_global PGUID _null_ _null_ ));
#define GLOBALTABLESPACE_OID 1664
#endif /* PG_TABLESPACE_H */
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 7d6d7d0754c..0404385de98 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -255,7 +255,7 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMETZOID, ECPG_ARRAY_NONE, stmt->lineno))
return ECPG_ARRAY_ERROR;
- if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ZPBITOID, ECPG_ARRAY_NONE, stmt->lineno))
+ if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BITOID, ECPG_ARRAY_NONE, stmt->lineno))
return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARBITOID, ECPG_ARRAY_NONE, stmt->lineno))
return ECPG_ARRAY_ERROR;
diff --git a/src/interfaces/ecpg/ecpglib/pg_type.h b/src/interfaces/ecpg/ecpglib/pg_type.h
index 5d9eeca03a7..f75c8878882 100644
--- a/src/interfaces/ecpg/ecpglib/pg_type.h
+++ b/src/interfaces/ecpg/ecpglib/pg_type.h
@@ -54,7 +54,7 @@
#define TIMESTAMPTZOID 1184
#define INTERVALOID 1186
#define TIMETZOID 1266
-#define ZPBITOID 1560
+#define BITOID 1560
#define VARBITOID 1562
#define NUMERICOID 1700
#define REFCURSOROID 1790