Use NIL for empty lists (#890)

Postgres standard way to check for list emptiness is to compare a pointer to
NIL rather than NULL.
This commit is contained in:
Julien Rouhaud
2025-08-23 18:31:22 +08:00
committed by GitHub
parent ea4746f6c0
commit dd3a1e9137
2 changed files with 2 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
Relation index;
/* Never use index without order */
if (path->indexorderbys == NULL)
if (path->indexorderbys == NIL)
{
*indexStartupCost = get_float8_infinity();
*indexTotalCost = get_float8_infinity();

View File

@@ -92,7 +92,7 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
Relation index;
/* Never use index without order */
if (path->indexorderbys == NULL)
if (path->indexorderbys == NIL)
{
*indexStartupCost = get_float8_infinity();
*indexTotalCost = get_float8_infinity();