{"Entry":{"collection":"func","key":"pg-database-size","name":"pg_database_size","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"fca2892923fd7e469647f03b52713463c875d66f144acfe6fae30930092675d4","first_version":"8.1","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.499052+08:00","last_version":"20","name":"pg_database_size","name_key":"pg_database_size","position":29035,"present_in":["8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_database_size ( name ) → bigint","signature_count":2,"slug":"pg-database-size","source_rev":"b7bd9cda","summary":"Computes the total disk space used by the database with the specified name or OID.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-database-size","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-database-size","SourceRevision":"b7bd9cda","Facts":{"description":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have CONNECT privilege on the specified database (which is granted by default) or have privileges of the pg_read_all_stats role.","description_html":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e privilege on the specified database (which is granted by default) or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-ADMIN-DBSIZE","file":"functions-admin.html","slug":"18"},"group":"admin","group_label":"System Administration Functions","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have CONNECT privilege on the specified database (which is granted by default) or have privileges of the pg_read_all_stats role.","description_html":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e privilege on the specified database (which is granted by default) or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_database_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_database_size ( name ) → bigint","zh_from":""},{"description":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have CONNECT privilege on the specified database (which is granted by default) or have privileges of the pg_read_all_stats role.","description_html":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e privilege on the specified database (which is granted by default) or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_database_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003eoid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_database_size ( oid ) → bigint","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-DBSIZE","file":"functions-admin.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-database-size","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_database_size","Summary":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有CONNECT权限（默认情况下授予），或者具有pg_read_all_stats角色的权限。","BodyHTML":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode\u003epg_read_all_stats\u003c/code\u003e角色的权限。\u003cpre\u003epg_database_size ( name ) → bigint\u003c/pre\u003e计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode\u003epg_read_all_stats\u003c/code\u003e角色的权限。\u003cpre\u003epg_database_size ( oid ) → bigint\u003c/pre\u003e计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode\u003epg_read_all_stats\u003c/code\u003e角色的权限。","SourceRevision":"1b5ca64c","ContentHash":"efdb1ede8a83062ebb1011b5bb6f56b7224069714d6034f2e6ac01d8fd25ac72","Payload":{"description_zh":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有CONNECT权限（默认情况下授予），或者具有pg_read_all_stats角色的权限。","description_zh_html":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e角色的权限。","signatures":[{"description_zh":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有CONNECT权限（默认情况下授予），或者具有pg_read_all_stats角色的权限。","description_zh_html":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e角色的权限。","returns":"bigint","text":"pg_database_size ( name ) → bigint","zh_from":"doc"},{"description_zh":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有CONNECT权限（默认情况下授予），或者具有pg_read_all_stats角色的权限。","description_zh_html":"计算具有指定名称或OID的数据库使用的总磁盘空间。要使用此函数，您必须对指定数据库具有\u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e权限（默认情况下授予），或者具有\u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e角色的权限。","returns":"bigint","text":"pg_database_size ( oid ) → bigint","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"7a34ef465bb8c0fc5223dd7a56f242e3696a89d11af20938977718f46aef2cbf","Text":"pg_database_size ( name ) → bigint","Returns":"bigint","Payload":{"description":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have CONNECT privilege on the specified database (which is granted by default) or have privileges of the pg_read_all_stats role.","description_html":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e privilege on the specified database (which is granted by default) or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_database_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_database_size ( name ) → bigint","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"cb0b46965a76d2f0dc4904e160045adcb011592391a8b70b46434f376b6d4eef","Text":"pg_database_size ( oid ) → bigint","Returns":"bigint","Payload":{"description":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have CONNECT privilege on the specified database (which is granted by default) or have privileges of the pg_read_all_stats role.","description_html":"Computes the total disk space used by the database with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCONNECT\u003c/code\u003e privilege on the specified database (which is granted by default) or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_database_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003eoid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_database_size ( oid ) → bigint","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
