sql: implement buffer and scanBuffer planNodes #37050
Labels
A-sql-fks
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A buffer planNode should consume input rows, write them to a buffer, and pass the rows through to the next node in the chain.
A scanBuffer planNode references a single buffer planNode and behaves like an iterator into that buffer. It doesn't live on the "main path" of a planNode tree - something else has to
Next
it to start it consuming from the buffer.Together, these two nodes enable a couple of use cases:
WITH
clause in a CTE, which is a known limitation: sql: multi-use common table expressions #21084For use case 2, you can imagine trees like the following making up a foreign key check, together (see issue #37053 for
errorIfRows
):The text was updated successfully, but these errors were encountered: