PSQL System Catalog Functions
The system catalog functions allow you to obtain database metadata from the data dictionary files (also known as the catalog). The system catalog functions can be used only in a FROM clause.
PSQL can also return metadata information by calling appropriate catalog APIs or by using system stored procedures (see System Stored Procedures). Those two methods, however, do not store the metadata in a view that can be JOINed or UNIONed with other tables. To provide JOIN and UNION capability with other tables, the system catalog functions are required.
Note that some access methods, such as ADO.NET, require system catalog functions for entity support so that JOIN and UNION capabilities are available.
A temporary view schema for each system catalog function is created during the prepare phase and data is stored in the view by calling a corresponding catalog API during the execute phase.
The following table lists the available system catalog functions.
1 Because the PSQL catalog functions are based on the ODBC ones, you may refer to the ODBC documentation for additional information if you choose. This chapter provides enough information for you to understand and use the PSQL catalog functions, but does not provide exhaustive technical details.
Return Status
Each system catalog function can return one of the following statuses depending on the execution results:
Summary
The following characteristics apply to the system catalog functions: