Interpret the scan descriptor
The database server constructs a scan descriptor to pass the contents of the Projection clause to the access method. The scan descriptor specifies which columns the query projects and provides information about the locks and isolation levels that apply to the data that the query specifies.
For efficiency, the access method can format only the data that the Projection clause projects and places NULL values in the remaining columns. To determine which columns to project, call the mi_scan_projs() function.
As one of its
primary functions, the scan descriptor stores a pointer to another
opaque structure, the qualification descriptor that contains
WHERE-clause information. To access the qualification descriptor,
use the pointer that the mi_scan_quals() function
returns. A NULL-valued pointer indicates that the database server
did not construct a qualification descriptor.
Important: If mi_scan_quals() returns
a NULL-valued pointer, the access method must format and return all
possible rows.