Rename pg_complete_relation_size() to pg_total_relation_size(), for the
authorNeil Conway
Fri, 16 Sep 2005 05:35:41 +0000 (05:35 +0000)
committerNeil Conway
Fri, 16 Sep 2005 05:35:41 +0000 (05:35 +0000)
sake of brevity and clarity.

Make pg_reload_conf(), pg_rotate_logfile(), and pg_cancel_backend()
return a boolean rather than an integer to indicate success or failure.

Along the way, make some minor cleanups to dbsize.c -- in particular,
use elog() rather than ereport() for "shouldn't happen" error
conditions, and remove some of the more flagrant violations of the
Postgres indentation conventions.

Catalog version bumped.

doc/src/sgml/func.sgml
doc/src/sgml/release.sgml
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/misc.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/builtins.h

index eaebce24c7c7d23eccab760e09665efff447efab..c6c9d87e8a5024b3cbcfffa9f02daa7404e3f208 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -9368,21 +9368,21 @@ SELECT set_config('log_statement_stats', 'off', false);
        
         pg_cancel_backend(pid int)
         
-       int
+       boolean
        Cancel a backend's current query
       
       
        
         pg_reload_conf()
         
-       int
+       boolean
        Cause server processes to reload their configuration files
       
       
        
         pg_rotate_logfile()
         
-       int
+       boolean
        Rotate server's logfile
       
      
@@ -9390,7 +9390,8 @@ SELECT set_config('log_statement_stats', 'off', false);
    
 
    
-    Each of these functions returns 1 if successful, 0 if not successful.
+    Each of these functions returns true if
+    successful and false otherwise.
    
 
    
@@ -9502,7 +9503,7 @@ SELECT set_config('log_statement_stats', 'off', false);
     pg_relation_size
    
    
-    pg_complete_relation_size
+    pg_total_relation_size
    
    
     pg_size_pretty
@@ -9527,28 +9528,28 @@ SELECT set_config('log_statement_stats', 'off', false);
         pg_tablespace_size(oid)
         
        bigint
-       Total disk space used by the tablespace with the specified OID
+       Disk space used by the tablespace with the specified OID
       
       
        
         pg_tablespace_size(name)
         
        bigint
-       Total disk space used by the tablespace with the specified name
+       Disk space used by the tablespace with the specified name
       
       
        
         pg_database_size(oid)
         
        bigint
-       Total disk space used by the database with the specified OID
+       Disk space used by the database with the specified OID
       
       
        
         pg_database_size(name)
         
        bigint
-       Total disk space used by the database with the specified name
+       Disk space used by the database with the specified name
       
       
        
@@ -9562,25 +9563,31 @@ SELECT set_config('log_statement_stats', 'off', false);
         pg_relation_size(text)
         
        bigint
-       Disk space used by the table or index with the specified name.
-       The name may be qualified with a schema name
+       
+        Disk space used by the table or index with the specified name.
+        The table name may be qualified with a schema name
+       
       
       
        
-        pg_complete_relation_size(oid)
+        pg_total_relation_size(oid)
         
        bigint
-       Total disk space used by the table with the specified OID, 
-       including indexes and toasted data
+       
+        Total disk space used by the table with the specified OID,
+        including indexes and toasted data
+       
       
       
        
-        pg_complete_relation_size(text)
+        pg_total_relation_size(text)
         
        bigint
-       Total disk space used by the table with the specified name, 
-       including indexes and toasted data.
-       The table name may be qualified with a schema name
+       
+        Total disk space used by the table with the specified name,
+        including indexes and toasted data.  The table name may be
+        qualified with a schema name
+       
       
       
        
@@ -9610,9 +9617,9 @@ SELECT set_config('log_statement_stats', 'off', false);
    
 
    
-    pg_complete_relation_size accepts the OID or name of a table
-    or toast table, and returns the size in bytes of the data and all
-    associated indexes and toast tables.
+    pg_total_relation_size accepts the OID or name of a
+    table or toast table, and returns the size in bytes of the data
+    and all associated indexes and toast tables.
    
 
    
@@ -9669,7 +9676,7 @@ SELECT set_config('log_statement_stats', 'off', false);
     pg_ls_dir
    
    
-    pg_ls_dir() returns all the names in the specified
+    pg_ls_dir returns all the names in the specified
     directory, except the special entries . and
     ...
    
@@ -9678,7 +9685,7 @@ SELECT set_config('log_statement_stats', 'off', false);
     pg_read_file
    
    
-    pg_read_file() returns part of a text file, starting
+    pg_read_file returns part of a text file, starting
     at the given offset, returning at most length
     bytes (less if the end of file is reached first).  If offset
     is negative, it is relative to the end of the file.
@@ -9688,7 +9695,7 @@ SELECT set_config('log_statement_stats', 'off', false);
     pg_stat_file
    
    
-    pg_stat_file() returns a record containing the file
+    pg_stat_file returns a record containing the file
     size, last accessed timestamp, last modified timestamp, 
     last file status change timestamp (Unix platforms only), 
     file creation timestamp (Win32 only), and a boolean indicating 
index 3bbb6da4e847d124e045a9d6a94e6a35d35c26b0..6300a89a6bccc30c27743485746ab2adec638865 100644 (file)
@@ -1,5 +1,5 @@