Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PostgreSQL
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Schemas === PostgreSQL schemas are [[namespace]]s, allowing objects of the same kind and name to co-exist in a single database. They are not to be confused with a [[database schema]]βthe abstract, structural, organizational specification which defines how every table's data relates to data within other tables. All PostgreSQL database objects, except for a few global objects such as [[#Security|roles]] and [[tablespace]]s, exist within a schema. They cannot be nested, schemas cannot contain schemas. The permission system controls access to schemas and their content. By default, newly created databases have only a single schema called ''public'' but other schemas can be added and the public schema isn't mandatory. A {{code|search_path}} setting determines the order in which PostgreSQL checks schemas for unqualified objects (those without a prefixed schema). By default, it is set to {{code|$user, public}} ({{code|$user}} refers to the currently connected database user). This default can be set on a database or role level, but as it is a session parameter, it can be freely changed (even multiple times) during a client session, affecting that session only. Non-existent schemas, or other schemas not accessible to the logged-in user, that are listed in search_path are silently skipped during object lookup. New objects are created in whichever valid schema (one that can be accessed) appears first in the search_path.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)