From: jerch (@jerch) <noreply+jerch@github.com>
To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>
Subject: Re: [psycopg/psycopg] issue #1157: proposal: retrieve range value dumper from inner_oid setting
Date: Tue, 21 Oct 2025 12:26:01 +0000
Message-ID: <gh-psycopg-psycopg-1157-c3426340179@github.com> (raw)
In-Reply-To: <gh-psycopg-psycopg-1157@github.com>
References: <gh-psycopg-psycopg-1157@github.com>
In the loader logic I stumbled over another question - the cload function gets a char pointer for the data and a length. But the real length needed to do the extraction at the current position is encoded within cload itself. How is that meant to be handled, if the provided data is too short? I currently raise a DataError, but also saw, that other cload functions basically dont care at the that level. This there some boundary check at higher level in place, e.g. to guarantee, that cload always gets enough bytes to chew on?