1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Remove AssertArg and AssertState

These don't offer anything over plain Assert, and their usage had
already been declared obsolescent.

Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13
This commit is contained in:
Peter Eisentraut
2022-10-28 09:19:06 +02:00
parent d37aa3d358
commit b1099eca8f
44 changed files with 162 additions and 174 deletions

View File

@@ -145,7 +145,7 @@ tuplesort_begin_heap(TupleDesc tupDesc,
oldcontext = MemoryContextSwitchTo(base->maincontext);
AssertArg(nkeys > 0);
Assert(nkeys > 0);
#ifdef TRACE_SORT
if (trace_sort)
@@ -177,8 +177,8 @@ tuplesort_begin_heap(TupleDesc tupDesc,
{
SortSupport sortKey = base->sortKeys + i;
AssertArg(attNums[i] != 0);
AssertArg(sortOperators[i] != 0);
Assert(attNums[i] != 0);
Assert(sortOperators[i] != 0);
sortKey->ssup_cxt = CurrentMemoryContext;
sortKey->ssup_collation = sortCollations[i];
@@ -297,7 +297,7 @@ tuplesort_begin_cluster(TupleDesc tupDesc,
/* Convey if abbreviation optimization is applicable in principle */
sortKey->abbreviate = (i == 0 && base->haveDatum1);
AssertState(sortKey->ssup_attno != 0);
Assert(sortKey->ssup_attno != 0);
strategy = (scanKey->sk_flags & SK_BT_DESC) != 0 ?
BTGreaterStrategyNumber : BTLessStrategyNumber;
@@ -381,7 +381,7 @@ tuplesort_begin_index_btree(Relation heapRel,
/* Convey if abbreviation optimization is applicable in principle */
sortKey->abbreviate = (i == 0 && base->haveDatum1);
AssertState(sortKey->ssup_attno != 0);
Assert(sortKey->ssup_attno != 0);
strategy = (scanKey->sk_flags & SK_BT_DESC) != 0 ?
BTGreaterStrategyNumber : BTLessStrategyNumber;
@@ -501,7 +501,7 @@ tuplesort_begin_index_gist(Relation heapRel,
/* Convey if abbreviation optimization is applicable in principle */
sortKey->abbreviate = (i == 0 && base->haveDatum1);
AssertState(sortKey->ssup_attno != 0);
Assert(sortKey->ssup_attno != 0);
/* Look for a sort support function */
PrepareSortSupportFromGistIndexRel(indexRel, sortKey);