Global Settings

pgCodeKeeper basic settings

_images/main_prefs.png
  • Show console on new output - allows to automatically show program console when opening it.
  • Ignore privileges and owners of database objects - allows to disable the search for differences in the properties of the objects related to DB roles.
  • Ignore differences in table column order - allows to ignore the order of colums when comparing the tables.
  • Reuse compare editor instead of opening new ones - allows using the already running comparison editor for comparing database objects (Select Show Diff in the right-click menu of the differences table).
  • Enable full dependencies from bodies of functions and procedures (experimental) - allows searching the dependences on functions and procedures within the bodies of other functions and procedures.
  • Simple formatting for VIEVs when reading via JDBC (not recommended by PostgreSQL) - allows using simplified view editing, where all unnecessary brackets are removed from the expression. This format might not be supported in the further PostgeSQL versions.
  • Ignore concurrent modification errors when reading DB - allows you to ignore errors that appear when modifying a DB object while reading it.
  • Free parser cache memory if not used for (minutes): - allows you to automatically clear parser cache not used for a certain amount of time. Setting this to 0 disables this behavior.
  • Clear parser cache - allows to clear parser cache.

Excluded objects

You can specify the objects that should not be considered when comparing databases on the pgCodeKeeper -> Ignored objects settings page.

_images/ignore_list.png

The Black list - White list switch allows to invert black list to white list and the other way around.

  • Text – name of the object.
  • Pattern – consider the name of the object as regular expression.
  • Ignore Contents – apply the rule for the matched object and all of its content.
  • Qualification – search objects by qualified name.
  • Type - object type (“ALL” is used for specifying any object type).

To add or remove an object to the list of excluded, use the add_obj and delete buttons respectively.

Note

In this case, the list of excluded objects will be general and will expand its effect at all the projects present in the projects directory. A detailed description of work with lists see in Ignore List.

DB update

Settings managing the database updates.

_images/db_update_prefs.png

On the pgCodeKeeper -> Update DB settings page you can adjust parameters for the work of the migration script editor.

  • Create migration script files in project directory – sets operations when creating migration scripts.
  • Delete migration script files when closing migration editor – sets oprations after closing the migration scripts, if they were created in the project directory.
  • Warn about dangerous scripts containing: - allows to show notifications if any selected dangerous expressions were formed during script generation.
  • Show script output in separate window – allows to view the message with the server response when migration is complete.
  • Surround migration script with START TRANSACTION; … COMMIT TRANSACTION; – allows to add the start … commit pair to the generating scripts.
  • Allow PostgreSQL to validate function bodies in DDL update script – allows to add the “SET check_function_bodies = true;” check in the beginning of a generating script.
  • Print ALTER COLUMN … TYPE … with USING expression – allows to add the expression, permitting to change the data type when changing the column type, to the script
  • Print CREATE INDEX CONCURRENTLY (without locks) – allows creating indexes in the CONCURRENTLY mode in scripts.
  • Create a script only from objects selected in the comparison panel – allows to exclude the objects, which were not selected explicitly, from the script.
  • Migration command - allows to use another utility or bootup options when applying migration script to the database.

Usage reports

Settings managing the usage reports.

_images/report.png

On the pgCodeKeeper -> Usage Reporting settings page you can enable or disable sending the pgCodeKeeper usage statistics.

The values which are sent for the statistics you can review in the Reported Values field.

Project editor

Settings managing the project editor.

_images/proj_editor_prefs.png

On the pgCodeKeeper -> Project editor settings page you can adjust the parameters of the project editor.

  • Switch to pgCodeKeeper perspective when opening editor – sets operations for switching the perspective while starting the project editor.
  • After applying a migration to editor’s DB do: – sets the editor operations while implementing the migration scripts.
  • Display git user that math the change – allows to display the column, containing the git user who made the latest change to the file, in the editor. The project should be under the version control system.
  • Show errors while getting changes allows displaying the list of errors discovered while getting changes.

SQL Editor

Settings managing the SQL editor.

_images/sql_editor_prefs.png

On the pgCodeKeeper -> SQL Editor settings page you can adjust the options of the SQL editor.

  • Disable parser for files larger than (lines): – allows you to select a size of files for which the pgCodeKeeper builder is disabled. This speeds up the process of opening the file and makes your work with it faster in general, but it also disables the search for errors and links to objects within this file. Setting this to 0 disables this behavior.
  • Bracket highlight – enables bracket highlight in one of the modes.
  • Single bracket – when selecting a bracket, highlights the matching bracket.
  • Both brackets – when selecting a bracket, highlights the selected and the matching brackets.
  • Current block brackets – highlights the brackets between which the cursor is situated.
  • Bracket highlight color – allows to select the color of brackets highlighting.

Syntax Coloring

Settings managing the syntax highlighting.

_images/syntax_highlighting.png

On the pgCodeKeeper -> SQL Editor -> Syntax highlighting you can set color and style for the font in which all the corresponding syntax will be displayed in the pgCodeKeeper SQL editor.

SQL Editor Templates

Creating, deleting and editing the templates for auto expand in the SQL editor

_images/sql_templates.png

On the pgCodeKeeper -> SQL Editor -> SQL Editor Templates settings page you can manage SQL templates, available in the pgCodeKeeper SQL editor. The list of available actions is displayed to the right of the templates list.

DB storage

Settings managing the storage of the parameters of the DB connection.

On the pgCodeKeeper -> DB Store settings page you can find the list of records for connecting to the databases.

_images/db_store.png

Click add_obj to add a storage. The DB credentials dialog will appear, in which you should specify the parameters of the connection data: host, port, DB name, user, password, as well as forbid recording to DB and select DB type (PostgreSQL or MS SQL). For MS SQL, you can specify a domain. You can specify the name of the record manually. To do this, disable the Auto-generate option.

Note

pgCodeKeeper supports the pgpass file. To do this, leave the password field blank.

_images/new_connection.png

Ignore List can be connected as an external file.

_images/new_connection_ignore_list.png
You can extend connection properties with the settings specified at:
_images/new_connection_properties.png
  • Use external DB loader instead of JDBC - allows using external database loader instead of JDBC.
  • Loader executable - path to a utility, executable file or a script used for loading.
  • Loader custom parameters - utility activation custom parameters.
_images/new_connection_pg_dump.png

To add a storage basing on data from an already created storage, you should highlight the database storage object and click|copy|. The DB credentials dialogue will appear, in which you can change the connection parameters.

To add a storage basing on the data from the .pgpass file, click|pg_pass|. A dialogue will appear, in which you should select the .pgpass file. After that, the Pgpass sources list dialogue will open:

_images/db_store_dialog_pg_pass_1.png

There, you should select the line with the data, basing on which the storage will be created. The DB credentials dialogue will appear, where you can confirm the connection parameters.

_images/db_store_dialog_pg_pass_2.png

After that, you can close the Pgpass sources list dialogue.

To edit a storage, highlight the database storage object and click editor_area. The DB credentials dialogue will appear in which you can change the connection parameters.

To delete a storage, select the required record and click delete.

Attention

The Restore Defaults button on the settings page deletes all the records for the databases connection and creates one ‘default’ record without any data on the connection.

Attention

To save the changes, you should click Apply or Apply and Close in the DB connection parameters storage, on the settings page.