Once get into the docker container CLI either using the docker view or directly to the CLI
docker exec -it df6d7538e06917bc2c411b413685710bae819e2fdde735678cd28776d6636a42 /bin/sh
psql -U postgres -W.
In the above postgres is the user name to the Postgres. This will be usually found in the Django settings files.
admin
psql -U admin dbname
Once get In, below command can give the detail of the tables inside
\dt+
Now to get contents of the DB, usual SQL can be run
Select * from <table_name>
References:
https://www.postgresqltutorial.com/postgresql-show-tables/
No comments:
Post a Comment