Re: pg_database_size(oid)
От | Greg Smith |
---|---|
Тема | Re: pg_database_size(oid) |
Дата | |
Msg-id | 4B7C9BEC.8080209@2ndquadrant.com обсуждение исходный текст |
Ответ на | pg_database_size(oid) (Dhimant Patel <drp4kri@gmail.com>) |
Ответы |
Doubts about oid
|
Список | pgsql-general |
Dhimant Patel wrote: > I have created a database, which I plan to load with several tables. I > am trying to find the size of the databases and came > across pg_database_size(oid) function. Here's what you probably want: select datname,pg_size_pretty(pg_database_size(pg_database.oid)) from pg_database order by pg_database_size(pg_database.oid) desc; The OID in these are sort of hidden column, there's a list of them all at http://www.postgresql.org/docs/current/static/ddl-system-columns.html Most tables will not have an OID nowadays, but many of the system catalog ones still do. ctid is another handy one to know about--useful for removing duplicate records and some other fancy tricks. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us
В списке pgsql-general по дате отправления: