gpt4 book ai didi

postgresql - 不能在 postgres 中删除函数

转载 作者:行者123 更新时间:2023-11-29 13:51:35 24 4
gpt4 key购买 nike

我有作为触发器的一部分编写的函数,但无法使用 DROP FUNCTION aft_delete(); 删除该函数。为什么会这样?

myname=# \df
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+------------+------------------+---------------------+---------
public | aft_delete | trigger | | trigger
(1 row)

myname=# DROP FUNCTION aft_delete();
ERROR: could not find tuple for trigger 34119

最佳答案

您可能需要使用 CASCADE 关键字来删除相关触发器(假设这是您想要的)。

https://www.postgresql.org/docs/current/static/sql-dropfunction.html

关于postgresql - 不能在 postgres 中删除函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40123903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com