aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h12
-rw-r--r--src/include/executor/tuptable.h8
-rw-r--r--src/include/miscadmin.h2
-rw-r--r--src/include/utils/pgstat_internal.h4
4 files changed, 7 insertions, 19 deletions
diff --git a/src/include/c.h b/src/include/c.h
index e5510e278d1..d70ed84ac58 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -793,8 +793,6 @@ typedef NameData *Name;
#define Assert(condition) ((void)true)
#define AssertMacro(condition) ((void)true)
-#define AssertArg(condition) ((void)true)
-#define AssertState(condition) ((void)true)
#define AssertPointerAlignment(ptr, bndr) ((void)true)
#elif defined(FRONTEND)
@@ -802,8 +800,6 @@ typedef NameData *Name;
#include <assert.h>
#define Assert(p) assert(p)
#define AssertMacro(p) ((void) assert(p))
-#define AssertArg(condition) assert(condition)
-#define AssertState(condition) assert(condition)
#define AssertPointerAlignment(ptr, bndr) ((void)true)
#else /* USE_ASSERT_CHECKING && !FRONTEND */
@@ -829,14 +825,6 @@ typedef NameData *Name;
(ExceptionalCondition(#condition, __FILE__, __LINE__), 0)))
/*
- * AssertArg and AssertState are identical to Assert. Some places use them
- * to indicate that the complaint is specifically about a bad argument or
- * unexpected state, but this usage is largely obsolescent.
- */
-#define AssertArg(condition) Assert(condition)
-#define AssertState(condition) Assert(condition)
-
-/*
* Check that `ptr' is `bndr' aligned.
*/
#define AssertPointerAlignment(ptr, bndr) \
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index a001e448bad..f12922663e5 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -374,7 +374,7 @@ slot_getallattrs(TupleTableSlot *slot)
static inline bool
slot_attisnull(TupleTableSlot *slot, int attnum)
{
- AssertArg(attnum > 0);
+ Assert(attnum > 0);
if (attnum > slot->tts_nvalid)
slot_getsomeattrs(slot, attnum);
@@ -389,7 +389,7 @@ static inline Datum
slot_getattr(TupleTableSlot *slot, int attnum,
bool *isnull)
{
- AssertArg(attnum > 0);
+ Assert(attnum > 0);
if (attnum > slot->tts_nvalid)
slot_getsomeattrs(slot, attnum);
@@ -409,7 +409,7 @@ slot_getattr(TupleTableSlot *slot, int attnum,
static inline Datum
slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
{
- AssertArg(attnum < 0); /* caller error */
+ Assert(attnum < 0); /* caller error */
if (attnum == TableOidAttributeNumber)
{
@@ -483,7 +483,7 @@ static inline TupleTableSlot *
ExecCopySlot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
{
Assert(!TTS_EMPTY(srcslot));
- AssertArg(srcslot != dstslot);
+ Assert(srcslot != dstslot);
dstslot->tts_ops->copyslot(dstslot, srcslot);
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index e7ebea4ff44..795182fa519 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -407,7 +407,7 @@ extern PGDLLIMPORT ProcessingMode Mode;
#define SetProcessingMode(mode) \
do { \
- AssertArg((mode) == BootstrapProcessing || \
+ Assert((mode) == BootstrapProcessing || \
(mode) == InitProcessing || \
(mode) == NormalProcessing); \
Mode = (mode); \
diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h
index 627c1389e4c..c869533b282 100644
--- a/src/include/utils/pgstat_internal.h
+++ b/src/include/utils/pgstat_internal.h
@@ -739,7 +739,7 @@ pgstat_copy_changecounted_stats(void *dst, void *src, size_t len,
static inline int
pgstat_cmp_hash_key(const void *a, const void *b, size_t size, void *arg)
{
- AssertArg(size == sizeof(PgStat_HashKey) && arg == NULL);
+ Assert(size == sizeof(PgStat_HashKey) && arg == NULL);
return memcmp(a, b, sizeof(PgStat_HashKey));
}
@@ -749,7 +749,7 @@ pgstat_hash_hash_key(const void *d, size_t size, void *arg)
const PgStat_HashKey *key = (PgStat_HashKey *) d;
uint32 hash;
- AssertArg(size == sizeof(PgStat_HashKey) && arg == NULL);
+ Assert(size == sizeof(PgStat_HashKey) && arg == NULL);
hash = murmurhash32(key->kind);
hash = hash_combine(hash, murmurhash32(key->dboid));