You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Improve castNode notation by introducing list-extraction-specific variants.
This extends the castNode() notation introduced by commit5bcab11 toprovide, in one step, extraction of a list cell's pointer and coercion toa concrete node type. For example, "lfirst_node(Foo, lc)" is the sameas "castNode(Foo, lfirst(lc))". Almost half of the uses of castNodethat have appeared so far include a list extraction call, so this ispretty widely useful, and it saves a few more keystrokes compared to theold way.As with the previous patch, back-patch the addition of these macros topg_list.h, so that the notation will be available when back-patching.Patch by me, after an idea of Andrew Gierth's.Discussion:https://postgr.es/m/14197.1491841216@sss.pgh.pa.us