Understanding the organization of the PostgreSQL database's logical objects helps with the understanding of object relations and interactions. PostgreSQL databases, roles, tablespaces, settings, and template languages have the same level of hierarchy, as shown in the following diagram:
All objects in the hierarchy are explained in detail in the following section.