Description
This function lists a cPanel account's PostgreSQL® databases.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
This function does not accept parameters.
Returns
| 
 Return  | 
 Type  | 
 Description  | 
 Possible values  | 
 Example  | 
| 
 sizemeg  | 
 integer  | 
 The size of the database.  | 
 A real number that represents the size of the database, measured in Megabytes (MB).  | 
 5.17  | 
| 
 userlist  | 
 array of hashes  | 
 An array of hashes of each database and its authorized database users.  | 
 This array of hashes includes the dband user returns.  | 
 
  | 
| 
 db  | 
 string  | 
 The database name. The function returns this value in the userlist hash.  | 
 A valid string.  | 
 example_pgdb1  | 
| 
 user  | 
 string  | 
 The database username. The function returns this value in the userlist hash.  | 
 A valid string.  | 
 example_pguser1  | 
| 
 db  | 
 integer  | 
 The database name.  | 
 A valid string.  | 
 example_pgdb1  | 
| 
 usercount  | 
 integer  | 
 The number of users that can access to the database.  | 
 An integer.  | 
 1  | 
| 
 size  | 
 integer  | 
 The size of the database.  | 
 A real number that represents the size of the database, measured in bytes.  | 
 5419008  | 
| 
 reason  | 
 string  | 
 A reason for failure. Note: This function only returns areason value if it failed.  | 
 A string that describes the error.  | 
 This is an error message.  | 
| 
 result  | 
 Boolean  | 
 Whether the function succeeded.  | 
  | 
 1  | 
