GoLand 2023.2 Help

Modify

The following topic shows various ways to modify tables in GoLand.

Modify a table

Starting with GoLand 2022.1, you can change database-specific parameters of a table. The IDE generates fields for the Modify dialog automatically according to the properties received during the introspection. For example, by using this dialog in PostgreSQL, you can add and edit column check constraints.

  1. In the Database tool window ( View | Tool Windows | Database) , right-click a table and select Modify Table.

  2. In the Modify dialog, specify object settings that you need.

  3. Click OK.

Modify a table

Inspect same family objects in a table

  1. In the Database tool window ( View | Tool Windows | Database) , right-click a table and select Modify Table.

  2. In the Modify dialog, double-click the family node.

    Table with similar database objects in a family node of a Modify dialog

Enable read-only mode for a table

To protect a table from accidental modifications in the data editor, you can make the table read-only.

  • To enable read-only mode, click the Click to toggle the read-only attribute icon (The Click to toggle the read-only attribute icon) in the lower-right corner of the editor.

To turn off read-only mode, click the Click to toggle the read-only attribute icon again.

Enable the read-only mode for a table

Configure GRANT privileges for tables

  1. In the Database tool window ( View | Tool Windows | Database) , right-click an object and select Modify Table.

  2. On the Grants tab, click the Add button (the Add button).

  3. In the user field, type the username. You can press Control+Space to use code completion in this field.

  4. Click the grant field, from the drop-down near each privilege, select Grant or Grant with option. The Grant with option privilege means that a user can grant to or revoke from other users those privileges.

Productivity tips

Modify a table from the data editor

You can modify a table while you edit table data.

  1. Double-click a table to open it in the data editor.

  2. Press Control+F6.

  3. Modify data and click OK.

  4. Press Control+F5 to reload the page.

Last modified: 03 July 2023