Editors and views

pgCodeKeeper project editor

Project editor is the main way of working with pgCodeKeeper. The editor interface consists of several main parts:

  1. Eclipse tool bar
  2. Editor tool bar
  3. Differences table
  4. Comparison panel
  5. Object counter

Eclipse tool bar contains tools for working with SQL editor. The file button allows you to open a new SQL editor.

Editor tool bar is used for working with the object list. There are the following opportunities:

  • check_all – select all objects.
  • uncheck_all – deselect all the objects.
  • loop_obj – invert the selecting of objects.
  • copy_edit – copy the set of selected objects to the clipboard as a regular expression.
  • empty_filter – inactive / filter_tsk – active object filter.
  • search – filter list of objects by name or regular expression.
  • save_edit – apply changes
  • ⯆ – drop-down menu with the directions of changes. If you click the Project label, you will also see the menu with the directions of changes.
  • refresh – get changes
  • ⯆ – drop-down menu with database sources. You can also select the database sources in the combo box element.

The ⯆ drop-down menus allow us to launch the operations of receiving and applying changes with overriding some settings.

Diff table shows the list of objects different for the DB schemas under comparison. Here you can find the info on object type, change type, object name, container, git user, database user.

Object type - the following object types are supported: SCHEMA, TYPE, SEQUENCE, TABLE, FUNCTION, PROCEDURE, VIEW, CONSTRAINT, INDEX, TRIGGER.


USER, ROLE, ASSEMBLY are supported additionally for MS SQL.

Change type - an object can be in one of three conditions: exist only in a database, only in a project, or in both a project and a database. Depending on the condition and the direction of changes, objects in the list are marked as ‘delete’, ‘add’ and ‘edit’ or ‘CREATE’, ‘DROP’ and ‘ALTER’ respectively.

Container is the name of the parent object. For example, for an index, it is the name of a table or a view this index belongs to.

Git user - name of the user, who was the last one to change the project file for this object. In case if the files were changed locally, you’ll see a ‘*’ next to the username. To see this column, you should connect the project to the version control system and enable the corresponding option on the Project editor settings page.

Database user - name of the database user who was the last one to change the object in the database. To display this column, you’ll need the pg_dbo_timestamp extension.

Comparison panel shows changes which took place in SQL view of an object.

Object counter shows the selected and the total number of objects in the table.

SQL editor

SQL editor is not different from a regular Eclipse text editor appearance-wise, but it has functions of SQL syntax highlighting, SQL requests template autofilling and database schema objects navigation.


When using SQL-editor on the Eclipse tool bar, you will have the following options:

quick_update - Quick update. Execution of the migration script for differences between the object in the current file of the project and the respective object in the database. If the changes concern objects from other files or modify the data (for example, delete a column), there will be no update.
update_ddl - Execute selection. Execution of the current migration script (or the highlighted text) in the selected database.
progress_stop - Cancel execution. Cancel of execution of the current migration script.
refresh - Get changes. Refreshes the editor of the project containing the current file. Applicable to project files only.

Viewing the dependences of DB objects

The pg Dependencies view shows the dependencies containing the current object selected on the diff panel of the active project editor.


The arrows show the direction of connection of the dependant object towards its dependence.

The Project - Remote switch allows you to select the database under comparison for which you want to display objects and dependencies. After switching, you should select the element on the editor diff panel once again.

Add depcy allows you to open the dialog of manual adding of the dependencies.


In this window, you can directly set the dependences between the DB objects. This may prove useful, for example, in case if automated recognition won’t work for certain complex dependences. The added differences will be taken into consideration during generating the expression sequences for the migration script.

The window consists of two parts which serve for adding the dependences to the DB under comparison.

To add dependencies between objects, simply start entering the first letters of the object name, select the names of the dependent objects in the drop-down list and click Add. You’ll see the dependency in the list of added.

To remove a chain of dependent objects, highlight it and click Remove.

Object overrides

The Object overrides view displays the list of overridden objects in libraries for the active project editor. This view is displayed automatically when receiving changes if there is at least one conflict present.


The sync button shows the notes concerning only the objects selected on the differences panel of the active project editor.

Right-click menu allows you to open both versions of the object, as well as to view the differences in a dedicated comparison editor.

Query result

Query result view displays query results. Each query is displayed in a separate tab.