> [!NOTE] ProjectSet
> <table>
> <tr>
> <td width="25%"><img src="assets/ex_projectset.png"></td>
> <td>Evaluates set-returning functions (SRFs) in the target list, such as <code>generate_series()</code> or <code>unnest()</code>. It emits multiple rows for each input row, effectively 'projecting' a set of values into the execution stream.</td>
> </tr>
> </table>
>
> ```sql
> -- Expanding an array into multiple rows
> EXPLAIN (ANALYZE, COSTS, BUFFERS, VERBOSE)
> SELECT unnest(ARRAY[1,2,3]);
> ```
>
> ```text
> ProjectSet (cost=1.00..1.03 rows=3 width=4) (actual time=1.001..1.002 rows=3 loops=1)
> Output: unnest('{1,2,3}'::integer[])
> -> Result (cost=1.00..1.01 rows=1 width=0) (actual time=1.000..1.000 rows=1 loops=1)
> ```
>
> <table>
> <tr>
> <td rowspan="5" width="25%"><img src="assets/ex_projectset.svg"></td>
> <td><b>Performance</b></td><td>High performance; overhead is tied directly to the complexity of the set-returning function.</td>
> </tr>
> <tr><td><b>Factors</b></td><td>Function complexity and the total number of rows generated.</td></tr>
> <tr><td><b>Cost</b></td><td><code>`function cost + cpu_tuple_cost * number of rows`</code></td></tr>
> <tr><td><b>Operates on</b></td><td><a href="Structures/Result Set">Result Set</a></td></tr>
> <tr><td><b>Workloads</b></td><td><a href="Workloads/LWLock/Buffers/BufferContent">LWLock: BufferContent</a></td></tr>
> <tr><td colspan="3"><b>Description</b>: Projects sets of rows from functions.</td></tr>
> </table>