Docker exec -it continuous STDOUT output

I have a command (pg_restore ...) which if I do:

docker exec -it ID bash

and then execute it inside it, brings the output continuously, but if I do:

docker exec -it ID pg_restore ...

it still works, but I don’t get the output continuously. I also tried:

docker exec -it bash -c "pg_restore ..."

without success. Any idea how to get continous STDOUT?

Thanks

Source: StackOverflow