Updated on 2025-03-13 GMT+08:00

Function Scan

Description

Function scan is used to execute a function and obtain tuples from the result set returned by the function.

Typical Scenarios

When a query needs to call a function and return a result set, the function scan operator can call the function and obtain tuples from the result set returned by the function.

Examples

Example: Call a system function.

gaussdb=# EXPLAIN SELECT * FROM generate_series(2,4); 
                               QUERY PLAN                                
------------------------------------------------------------------------ 
 Function Scan on generate_series  (cost=0.00..10.00 rows=1000 width=4) 
(1 row)