Defining PostgreSQL Schemas

The following properties are applicable to a PostgreSQL Schema object.

Tab

Section

Property

Description

Additional Properties

 

 

Name

Specifies the name of the schema

 

 

 

If Not Exists

Specifies that if the collation already exists, no exception is thrown, and no action happens

 

 

 

Generate

Specifies whether a SQL statement for the table is generated during forward engineering

 

General

 

 

 

Session/Current User

Specifies the session for user and role

Current_Role: Returns the name of the currently active role (i.e., user or group) within the session. It reflects the role that is applicable for permission checking. It is equal to the session user by default, but it can be changed the SET ROLE command.

Current_User: Returns the name of the currently logged-in database user. It represents the user identifier applicable for permission checking. Like current_role, it is normally usually to the session user but can be changed using SET ROLE.

Session_User: Returns the user's name who initiated the current database connection. Superusers can change this setting using SET SESSION AUTHORIZATION.

 

Owner

Specifies the role name of the user who will own the new schema. If not set, by default, it is set to the user executing the command

 

 

Schema Element

Specifies SQL statements which define an object to create within the schema

CREATE SCHEMA accepts the clauses such as, CREATE TABLE, CREATE VIEW, CREATE INDEX, CREATE SEQUENCE, CREATE TRIGGER, and GRANT for object creations in separate commands.

  1. (Optional) Click the Comment tab and enter any comments you want to associate with the object.
  2. (Optional) Click the UDP tab to work with user-defined properties for the object.
  3. (Optional) Click the Notes tab to view and edit user notes.
  4. (Optional) Click the Extended Notes tab to view or edit user notes.
  5. Click Close.

    The schema is defined, and the PostgreSQL Schema Editor closes.

For more information, refer to PostgreSQL documentation.