On Wed, 19 Aug 2026 at 10:46, Peter Eisentraut <[email protected]> wrote:
>
> On 17.08.26 13:36, Matthias van de Meent wrote:
> > One update for the patch. This fixes non-DEBUG_NODE_TESTS_ENABLED
> > builds; I forgot to update the READ_LOCATION_FIELD definition in those
> > non-debug builds, CI picked this up quite quickly but I didn't get to
> > fixing it until today.
>
> The patch contains a comment:
>
> +        * We don't have a separate type for const StringInfos, unconstify +
> +        * careful coding will have to suffice.
>
> But the patch doesn't contain any unconstify() calls.

Thanks for noticing. An (unposted) earlier version stored a
StringInfoData, using its cursor field for decoding in pg_strtok(),
instead of changing the base string pointer.
The comment references the unconstify() needed to populate this
StringInfoData's non-const char* field.


Attached is patch v3, with new changes:
- Further simplified stringToNodeInternal;
- Another round of comments cleanup, including the one Peter pointed out;
- Added a small comment describing the ReadNodeContext struct;
- Fixed _readExtensibleNode()/ExtensibleNodeMethods->nodeRead(), per
Yuhang Qiu's review.


Kind regards,

Matthias van de Meent

Attachment: v3-0001-Make-stringToNode-infrastructure-thread-safe.patch
Description: Binary data

Reply via email to