Database Object Size Functions
pg_table_size(regclass)
Description: Retrieves the table size and calculates the total size of all files in the table directory.
Return type: int64.
pg_table_files(regclass)
Description: Retrieves the table size and returns the paths and sizes of all files in the table directory.
Return type:
- file_path: file path, which is of the text type.
- file_name: file name, which is of the text type.
- file_size: file size, which is of the int64 type.
pg_size_pretty(bigint)
Description: Converts the byte-calculated size into a human-readable size.
Return type: text.
pg_size_pretty(numeric)
Description: Converts the numerically represented byte-calculated size into a human-readable size.
Return type: text.
Note: pg_size_pretty formats the results of other functions into a human-readable format, using KB, MB, GB, or TB as appropriate.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot