postgresql中怎么查看函数

405次阅读
没有评论

postgresql中怎么查看函数

在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)

推荐:PostgreSQL教程

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:postgresql2022-12-02发表,共计1260字。
新手QQ群:570568346,欢迎进群讨论 Python51学习