0 votes
1 view
in SQL by (20.3k points)

Is there any command to find all the databases size in Postgres?

I am able to find the size of a specific database by using following command:

select pg_database_size('databaseName');

1 Answer

0 votes
by (40.3k points)

If you want to use the complete query. You can use this:

\l+ <db_name>

You will get the size of the database as well as some details about the database.

To find the size of all the databases, use this code:

\l+

To query with the postgresql helper commands, You need to go into the postgresql command prompt

To Check other postgresql helper commands, use this syntax:

\?

at the postgresql command prompt.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 31, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...