pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

Display connection notices asynchronously

Open stuartquin opened this issue 9 years ago • 2 comments
trafficstars

Currently notices emitted on the connection are output only after the query(ies) have completed: https://github.com/dbcli/pgcli/blob/master/pgcli/pgexecute.py#L291

It would be nice to have the notices appear as they are emitted as they currently do in psql. This may require some fundamental changes to how queries are executed so will need some investigation.

Example of long running query with notices:

test> create function slow_warnings() returns void language plpgsql as $$
      begin
          for i in 1..5 loop
              perform pg_sleep(1);
              raise warning 'i = %', i;
          end loop;
      end
      $$; 

Run select slow_warnings()

stuartquin avatar Dec 07 '15 07:12 stuartquin

Is there a chance this will be implemented? Just asking because the issue is from some years back.

riderinred avatar Nov 12 '21 17:11 riderinred

Most of the pgcli members, unfortunately, don't have much bandwidth, you understand we all work on pgcli in our free time. We still leave feature requests open, in the hopes that a community member will be invested enough to pick it up and submit a PR. Perhaps that will be you, @riderinred ? :) We welcome any and all contributions!

j-bennet avatar Nov 18 '21 21:11 j-bennet