Ask Your Question
0

How does pg_global differ from pg_default in PostgreSQL?

asked 2022-04-24 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-11 17:00:00 +0000

pufferfish gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-04-24 11:00:00 +0000

Seen: 10 times

Last updated: Jan 11 '23