Global Settings¶
pgCodeKeeper basic settings¶

- 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.
- Format object code automatically allows display and save the formatted function code in plpgsql and sql according to the SQL Editor formatting settings. For more info about the code formatting settings, see Formatting.
- Limit SELECT rows (0 to disable) - allows limiting the number of rows displayed as a result of the SELECT query. Set it to 0 to see all the results.
- 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.

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 and
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.

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.
- Print CONSTRAINT NOT VALID - allows adding the
NOT VALID
statement to the migration script for constraints. - Print CREATE IF NOT EXISTS/DROP IF EXISTS allows to add the
IF NOT EXISTS/IF EXISTS
statement to the migration script in the object’s CREATE / DROP statement. - Print DROP before CREATE statement allows to add the DROP statement before the CREATE statement in the migration script.
- Create a script only from objects selected in the comparison panel – allows to exclude the objects, which were not selected explicitly, from the script.
- Migrate data when re-creating tables allows to save the data when recreating a table. When recreating, the existing table is renamed and a new table is created. The data from the original table is transferred to the new one. The old, renamed table is deleted. The IDENTITY SEQUENCE status is transferred from the old table to the new one. Regular SEQUENCE are not supported.
- Migration command - allows to use another utility or bootup options when applying migration script to the database.
On the Update DB -> PRE/POST script tab, there are settings for adding the PRE/POST scripts to migrations. In the project, it is possible to create the PRE and POST directories, content of which will be added to the beginning and the end of the main script. Also, the PRE/POST scripts are available in global settings and in the CLI settings. To edit the content of the PRE/POST scripts, select the corresponding buttons.

Usage reports¶
Settings managing the usage reports.

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.

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.

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.
Formatting¶
Settings for managing the formatting rules.
On the pgCodeKeeper -> SQL Editor -> Formatting settings page, you can:
- set an indent type applied at the beginning of code lines;
- set an indent width for a selected indent type;
- enable/disable the removal of spaces at the end of lines;
- set the addition of spaces before/after operators.

Syntax Coloring¶
Settings managing the syntax highlighting.

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

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, there is a list of entries for connection to databases. To upload the connections list from a file, click Import connection list and select the required file containing the connections. You can also save a connections list to a separate file. To do that, click
Export connection list.

Click 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, DB group, as well as forbid recording to DB and select the DB type (PostgreSQL or MS SQL). For MS SQL, you can specify a domain. If the MS SQL database type is selected, the trust MS SQL certificate, parameter will be set by default. This parameter can be disabled. 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.

Ignore List can be connected as an external file.


- 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.

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:

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.

After that, you can close the Pgpass sources list dialogue.
To edit a storage, highlight the database storage object and click . The DB credentials dialogue will appear in which you can change the connection parameters.
To delete a storage, select the required record and click .
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.