pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: rjuju (@rjuju) <noreply+rjuju@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #890: Use NIL for empty lists
Date: Sun, 24 Aug 2025 01:03:31 +0000
Message-ID: <gh-pgvector-pgvector-890-c3217518211@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-890@github.com>
References: <gh-pgvector-pgvector-890@github.com>

Yes it's not surprising, using `NULL` is quite strong muscle memory thing in C and the additional cast done by `NIL` doesn't really add much.  It's definitely not a game changer to use NIL here, but if one day this list is changed to another structure (I think this kind of change happened quite frequently on the partitioning related structures some years ago)  you should then get a clear compiler error rather than random errors and segfaults that will make waste a bit of time at the time it breaks.  I guess that's the main reason to prefer NIL.

view thread (7+ messages)

Message-ID: <gh-pgvector-pgvector-890-c3217518211@github.com>
Permalink:  ../gh-pgvector-pgvector-890-c3217518211@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox