ITPub博客

首页 > IT职业 > IT生活 > postgresql中怎么查看函数

postgresql中怎么查看函数

IT生活 作者:nt1979 时间:2021-09-11 10:18:24 0 删除 编辑

在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教程

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4822/viewspace-2833928/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-05

  • 博文量
    318
  • 访问量
    17339