简体   繁体   English

在 DBeaver 或 PgAdmin 中看不到引发消息

[英]Can't see raise messages in DBeaver or PgAdmin

When i execute the function below (in the picture), i can't find the raise message anywhere even in execution logs: is there anyway to make it appear.当我执行下面的 function 时(在图片中),即使在执行日志中我也无法在任何地方找到引发消息:无论如何让它出现。

这里的功能图片

script:脚本:

 SELECT helloworld('myname');
    
    
    CREATE OR REPLACE FUNCTION helloWorld(name text) RETURNS void AS $helloWorld$
    DECLARE
    BEGIN
        RAISE LOG 'Hello, %', name;
    END;

$helloWorld$ LANGUAGE plpgsql;

Messages with the level LOG typicall don't get sent to the client. LOG级别的消息通常不会发送到客户端。

Either use RAISE NOTICE or set client_min_messages to log .使用RAISE NOTICE或将client_min_messages设置为log

also dont do a basic mistake like me that to see the raise notice messages inside function, you first have to call that function by select public.helloworld()也不要犯像我这样的基本错误,要在 function 中看到raise notice消息,您首先必须通过 select 调用 function select public.helloworld()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM