{"Entry":{"collection":"plan","key":"projectset","name":"ProjectSet","aliases":["ProjectSet","T_ProjectSet"],"metadata":{"aliases":["ProjectSet","T_ProjectSet"],"category":"Control","content_hash":"b4a17ac9acce045aceee850a9ff0f16de0155a7b7ab0d1412d51824b830fbcb5","imported_at":"2026-09-30T00:40:44.092116+08:00","name":"ProjectSet","name_zh":"ProjectSet","slug":"projectset","summary":"Evaluates set-returning expressions in the target list for rows from its child."}},"Definition":{"Collection":"plan","Key":"projectset","SourceDatabase":"center","Version":"18","SourceTable":"plan_node","SourceKey":"projectset","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"initializer":"ExecInitProjectSet","memory_mechanism":"unclassified","node_tag":"T_ProjectSet","parallel_callbacks":[],"partial_modes":[],"strategies":[],"text_names":["ProjectSet"]},"comparison_hash":"67eb48dae4edf18acce1d9762e9a041057c4b07a8b1b127ee6f4a2bca7960ed8","description":["Evaluates set-returning expressions in the target list for rows from its child."],"evidence_kind":"source and documentation","explain_names":["ProjectSet"],"explain_prefixes":["Parallel","Async"],"facts":[{"label":"Core node tag","value":"T_ProjectSet"},{"label":"Structured EXPLAIN Node Type","value":"ProjectSet"},{"label":"Inputs","value":"One child plan"},{"label":"Output","value":"Expanded result tuples"},{"label":"Executor initializer","value":"ExecInitProjectSet"},{"label":"Memory mechanism","value":"unclassified"}],"memory":{"description":"This extraction does not assign a universal memory limit or spill policy to this node. Inspect the same-build implementation and its expressions or provider.","evidence":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeProjectSet.c","path":"src/backend/executor/nodeProjectSet.c","sha256":"86da5522860678066d56fcdc7fabd9b4dc96aac818665f3d3b039df5805a0595","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}],"mechanism":"unclassified","source_notes":[]},"node_tag":"T_ProjectSet","parallel_callbacks":[],"partial_modes":[],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"},{"label":"Using EXPLAIN","url":"/docs/18/using-explain.html"},{"label":"Parallel plans","url":"/docs/18/parallel-plans.html"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 source archive","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_snapshot_utc":"","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},"runtime_verified":false,"sections":[{"paragraphs":["Structured formats use the Node Type above. Text-format spellings can also include operation, strategy, join type, scan direction or aggregation-stage attributes.","Text names recorded by this source: ProjectSet.","Parallel-aware and parallel-safe are different plan properties. A node running inside a parallel worker is not necessarily a parallel-aware node."],"title":"EXPLAIN names and attributes"},{"paragraphs":["This extraction does not assign a universal memory limit or spill policy to this node. Inspect the same-build implementation and its expressions or provider."],"title":"Memory and temporary storage"},{"paragraphs":["The source callbacks below can coordinate execution or collect worker instrumentation. Their presence is not a blanket claim that this node supports a shared parallel scan or shared state.","Callbacks in this build: none extracted from this node implementation."],"title":"Parallel execution and instrumentation"},{"paragraphs":["nodeProjectSet.c support for evaluating targetlists containing set-returning functions","ProjectSet nodes are inserted by the planner to evaluate set-returning functions in the targetlist. It's guaranteed that all set-returning functions are directly at the top level of the targetlist, i.e. they can't be inside more-complex expressions. If that'd otherwise be the case, the planner adds additional ProjectSet nodes.","Return tuples after evaluating the targetlist (which contains set returning functions).","Reset per-tuple context to free expression-evaluation storage allocated for a potentially previously returned tuple. Note that the SRF argument context has a different lifetime and is reset below.","Check to see if we're still projecting out tuples from a previous scan tuple (because there is a function-returning-set in the projection expressions). If so, try to project another one."],"title":"Executor implementation notes"},{"code":"case T_ProjectSet:\n\t\t\tpname = sname = \"ProjectSet\";\n\t\t\tbreak;","title":"EXPLAIN identity in core source"}],"source_inventory":{"executor":"src/backend/executor/execProcnode.c","explain":"src/backend/commands/explain.c","implementation":"src/backend/executor/nodeProjectSet.c"},"sources":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/commands/explain.c:1382","line":1382,"path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/execProcnode.c:171","line":171,"path":"src/backend/executor/execProcnode.c","sha256":"f8a06a3f539077249b20664b2812433db6d7bd12b2c0ca633525db43d06f112a","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeProjectSet.c","path":"src/backend/executor/nodeProjectSet.c","sha256":"86da5522860678066d56fcdc7fabd9b4dc96aac818665f3d3b039df5805a0595","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/include/nodes/plannodes.h","path":"src/include/nodes/plannodes.h","sha256":"52422b327a8049fbbb20d8b96008a0fc0a6fafa60f7eff3c695d5b2e83830120","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}],"strategies":[],"tables":[{"columns":[{"key":"label","label":"Text-format label"},{"key":"identity","label":"Structured node identity"}],"key":"explain-labels","rows":[{"identity":"ProjectSet","label":"ProjectSet"}],"title":"EXPLAIN labels in this source build"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 source archive","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_snapshot_utc":"","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},"sources":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/commands/explain.c:1382","line":1382,"path":"src/backend/commands/explain.c","sha256":"34c86d6070224a0e981efef51f79101d6d505e5874f1684ace183034bab14bb4","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/execProcnode.c:171","line":171,"path":"src/backend/executor/execProcnode.c","sha256":"f8a06a3f539077249b20664b2812433db6d7bd12b2c0ca633525db43d06f112a","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeProjectSet.c","path":"src/backend/executor/nodeProjectSet.c","sha256":"86da5522860678066d56fcdc7fabd9b4dc96aac818665f3d3b039df5805a0595","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/include/nodes/plannodes.h","path":"src/include/nodes/plannodes.h","sha256":"52422b327a8049fbbb20d8b96008a0fc0a6fafa60f7eff3c695d5b2e83830120","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}]},"MeasuredEvidence":{"runtime_verified":false}},"Text":{"Collection":"plan","Key":"projectset","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ProjectSet","Summary":"Evaluates set-returning expressions in the target list for rows from its child.","BodyHTML":"\u003cp\u003eEvaluates set-returning expressions in the target list for rows from its child.\u003c/p\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"af08d14851e8148cac4439e991c5bac6a1e5aafc8251f5561b8cdd0a2a7ea278","Payload":{"description":["Evaluates set-returning expressions in the target list for rows from its child."],"related":[{"label":"EXPLAIN","url":"/wiki/sql/explain/?v=18"},{"label":"Using EXPLAIN","url":"/docs/18/using-explain.html"},{"label":"Parallel plans","url":"/docs/18/parallel-plans.html"}],"sections":[{"paragraphs":["Structured formats use the Node Type above. Text-format spellings can also include operation, strategy, join type, scan direction or aggregation-stage attributes.","Text names recorded by this source: ProjectSet.","Parallel-aware and parallel-safe are different plan properties. A node running inside a parallel worker is not necessarily a parallel-aware node."],"title":"EXPLAIN names and attributes"},{"paragraphs":["This extraction does not assign a universal memory limit or spill policy to this node. Inspect the same-build implementation and its expressions or provider."],"title":"Memory and temporary storage"},{"paragraphs":["The source callbacks below can coordinate execution or collect worker instrumentation. Their presence is not a blanket claim that this node supports a shared parallel scan or shared state.","Callbacks in this build: none extracted from this node implementation."],"title":"Parallel execution and instrumentation"},{"paragraphs":["nodeProjectSet.c support for evaluating targetlists containing set-returning functions","ProjectSet nodes are inserted by the planner to evaluate set-returning functions in the targetlist. It's guaranteed that all set-returning functions are directly at the top level of the targetlist, i.e. they can't be inside more-complex expressions. If that'd otherwise be the case, the planner adds additional ProjectSet nodes.","Return tuples after evaluating the targetlist (which contains set returning functions).","Reset per-tuple context to free expression-evaluation storage allocated for a potentially previously returned tuple. Note that the SRF argument context has a different lifetime and is reset below.","Check to see if we're still projecting out tuples from a previous scan tuple (because there is a function-returning-set in the projection expressions). If so, try to project another one."],"title":"Executor implementation notes"},{"code":"case T_ProjectSet:\n\t\t\tpname = sname = \"ProjectSet\";\n\t\t\tbreak;","title":"EXPLAIN identity in core source"}],"tables":[{"columns":[{"key":"label","label":"Text-format label"},{"key":"identity","label":"Structured node identity"}],"key":"explain-labels","rows":[{"identity":"ProjectSet","label":"ProjectSet"}],"title":"EXPLAIN labels in this source build"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
