Database 无法在PostgreSQL中更新视图“例程”

Database 无法在PostgreSQL中更新视图“例程”,database,postgresql,triggers,views,Database,Postgresql,Triggers,Views,我有一个数据库,在PostgreSQL中有将近400个函数。其中许多函数具有用于调试的RAISE INFO。现在,我想在所有函数中对该加薪信息进行注释。为此,我使用以下查询: UPDATE information_schema.routines SET routine_definition = REPLACE(routine_definition,'RAISE','-- RAISE') WHERE (routine_definition) like '%RAISE%' 但它给了我以下的错误:

我有一个数据库,在PostgreSQL中有将近400个函数。其中许多函数具有用于调试的RAISE INFO。现在,我想在所有函数中对该加薪信息进行注释。为此,我使用以下查询:

UPDATE information_schema.routines SET routine_definition = REPLACE(routine_definition,'RAISE','-- RAISE') WHERE (routine_definition) like '%RAISE%' 
但它给了我以下的错误:

ERROR: cannot update view "routines"
SQL state: 55000
Detail: Views that do not select from a single table or view are not automatically updatable.
Hint: To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule.
我不知道该怎么做。

你想要,尽管我也担心用你的方法修改其他加薪声明。

谢谢Richard Huxton

以下是详细信息查询,以供参考:

 UPDATE pg_proc SET prosrc = REPLACE(prosrc,'RAISE','-- RAISE') WHERE (prosrc) like '%RAISE%'