Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In PostgreSQL, pgglobal and pgdefault are both schema names that hold system objects such as system tables, views, functions, and sequences. However, they differ in the scope of their visibility.

pg_global is a schema that contains global objects that are visible to all databases in a PostgreSQL cluster. This schema holds system objects that are common to all of the databases in a cluster.

pgdefault, on the other hand, is a schema that contains system objects that are specific to a particular database. When a new database is created, it automatically includes the pgdefault schema, which is used as the default schema for that database.

In summary, the primary difference between pgglobal and pgdefault is that pgglobal holds system objects that are visible to all databases in a cluster, while pgdefault holds system objects that are specific to a particular database.