Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to get the size of the database in postgresql

SELECT pg_size_pretty( pg_database_size('dbname') );
Comment

postgres database sizes

/* For multiple databases */
select t1.datname AS db_name,  
       pg_size_pretty(pg_database_size(t1.datname)) as db_size
from pg_database t1
order by pg_database_size(t1.datname) desc;
Comment

postgresql size of database

SELECT pg_database_size('named_db');
SELECT pg_size_pretty(pg_database_size('named_db'));
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql update table from another table 
Sql :: oracle tables with column name 
Sql :: print all records of table in mysql 
Sql :: oracle auto_increment 
Sql :: sql check if date is between 2 dates 
Sql :: mysql get all tables row count 
Sql :: mysql concatenate select results 
Sql :: sql values not in another table 
Sql :: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails 
Sql :: can you update NULL in sql 
Sql :: copy data from one table column to another table column in sql 
Sql :: sql add column after another column 
Sql :: sql concat string with column value 
Sql :: postgresql create schema in specific database 
Sql :: sql server query all database objects 
Sql :: change column name in sql 
Sql :: mysql url 
Sql :: mysql limit rows 
Sql :: create pl/sql stored procedure 
Sql :: sql count distinct group by 
Sql :: date_part mysql 
Sql :: postgres float to int 
Sql :: mysql update column default value CURRENT_TIMESTAMP error 
Sql :: Get the Db column names from a SqlDataReader 
Sql :: insert current date sql 
Sql :: how to create a table in mysql 
Sql :: sql select into statement 
Sql :: show table postgres command 
Sql :: postgresql check privileges on schema 
Sql :: postgres : ERROR: division by zero 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =