aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-04-30 00:19:36 +0200
committerAndres Freund <andres@anarazel.de>2015-04-30 00:19:36 +0200
commite0f26fc76532defd06caf79d711fa99cea83c532 (patch)
tree8afdb85371678450772d52fb38e24865a66749c3 /src
parent49601ab1a6df9059f7000f78af43f2e74afefa59 (diff)
downloadpostgresql-e0f26fc76532defd06caf79d711fa99cea83c532.tar.gz
postgresql-e0f26fc76532defd06caf79d711fa99cea83c532.zip
Correct replication origin's use of UINT16_MAX to PG_UINT16_MAX.
We can't rely on UINT16_MAX being present, which is why we introduced PG_UINT16_MAX... Buildfarm animal bowerbird via Andrew Gierth.
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/origin.c2
-rw-r--r--src/include/replication/origin.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index ab9ae0b6c2f..baf6bb79b80 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -266,7 +266,7 @@ replorigin_create(char *roname)
rel = heap_open(ReplicationOriginRelationId, ExclusiveLock);
- for (roident = InvalidOid + 1; roident < UINT16_MAX; roident++)
+ for (roident = InvalidOid + 1; roident < PG_UINT16_MAX; roident++)
{
bool nulls[Natts_pg_replication_origin];
Datum values[Natts_pg_replication_origin];
diff --git a/src/include/replication/origin.h b/src/include/replication/origin.h
index ca26bc3e64a..b814aeb4fd3 100644
--- a/src/include/replication/origin.h
+++ b/src/include/replication/origin.h
@@ -30,7 +30,7 @@ typedef struct xl_replorigin_drop
#define XLOG_REPLORIGIN_DROP 0x10
#define InvalidRepOriginId 0
-#define DoNotReplicateId UINT16_MAX
+#define DoNotReplicateId PG_UINT16_MAX
extern PGDLLIMPORT RepOriginId replorigin_sesssion_origin;
extern PGDLLIMPORT XLogRecPtr replorigin_sesssion_origin_lsn;