Monthly Archives: September 2020

Extract data from postgres in docker and save it to csv

The case is simple postgres database is hosted in a docker image and to access the database use this command. docker image name can be found with this command docker ps -a. docker exec -it <docker-image> psql -U postgres docker exec -it <docker-image> psql -U postgres -a <dbname> -c “copy(select u.name user_name,p.name place_name, attempts,p.created fromplace… Read More »