39.1. Creating a Table #

  1. In the navigation panel, go to Databases.

  2. (Optional) To display system databases, turn on Show system databases.

  3. Click the name of the database.

  4. Click the name of the schema.

  5. In the top-right corner of the page, click Create table.

  6. Specify parameters of the new table (parameters marked with an asterisk are required):

    • Name.

    • Tablespace: The tablespace where the table will be created.

    • Columns: Columns of the created table.

      To add a column:

      1. Click Add +.

      2. Specify parameters of the new column (parameters marked with an asterisk are required):

        • Name.

        • Type: The type of the column data.

        • NOT NULL: Specifies whether the column accepts NULL values.

        • Default value: The default value of the column.

        • Primary key: Specifies whether the column can contain only unique (non-repeating) values different from NULL.

          To add a primary key storage parameter, click Add + and specify the required parameters:

          • Name: The name of the primary key storage parameter.

            Possible values:

          • Value: The value of the primary key storage parameter.

        • Unique key: Specifies whether the column can contain only unique values.

          To add a unique key storage parameter, click Add + and specify the required parameters:

          • Name: The name of the unique key storage parameter.

            Possible values:

          • Value: The value of the unique key storage parameter.

        • Check expression: The constraint of the column.

        • Compression method: The compression method for the column.

          Possible values:

          • pglz

          • lz4

      3. Click Save.

    • Storage parameters: Storage parameters of the table.

      To add a storage parameter:

      1. Click Add +.

      2. Select the parameter.

      3. Specify the value.

    • UNLOGGED: Specifies whether the created table is unlogged.

    • lock_timeout, s: Abort any statement that waits longer than the specified time while attempting to acquire a lock on a table, index, row, or other database object. The time limit applies separately to each lock acquisition attempt.

      For more information about this parameter, refer to the official Postgres Pro documentation.

  7. Click Save.