Raise notice over dblink

Viewed 29

I have a function which I call over bdlink. This function has some calls of raise notice with detailed information about processing steps. Is there a way to get messages, raised by raise notice over dblink connection?

For example let function

create or replace function my_raise() returns boolean
language plpgsql as
$$
begin
  raise notice 'Test message';
  return true;
end;
$$

And if I call

select my_raise()

I found "Test message" in output. But my task is get "Test message" when function is called over dblink

select * from dblink('dbname=' || current_database(), 'select my_raise()') as t(res boolean)

I know that I can create communication table and save some data into it. I'll do that if I don't find any other decision.

0 Answers
Related