在PostgreSQL客户端psql中,可以使用\df查看数据库搜索路径下的所有函数,例如:
**postgres=# \df**
List of functions
Schema | Name | Result data type |
Argument data types
| Type
--------+---------------------------------------------------+---------------------------------+--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------+---------
public | __arima_adjust | double precision[] | distid integer, curr_tvals double precision[], prev_tvals double precision[], p integ
er
| normal
public | __arima_diff
因为PostgreSQL中的函数有四种分类:aggregates/normal/trigger/window functions,所以psql中提供了附加参数,分别用来显示对应的函数:\dfa、\dfn、dft、dfw。例如:
postgres=# \dft
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+--------------------+------------------+---------------------+---------
public | checkauthtrigger | trigger | | trigger
public | postgis_cache_bbox | trigger | | trigger
(2 rows)