Global Settings
pgCodeKeeper basic settings
Show console on new output - allows to automatically show program console when opening it.
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).
Ignore differences in table column order - allows to ignore the order of colums when comparing the tables.
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.
Ignore privileges and owners of database objects - allows to disable the search for differences in the properties of the objects related to DB roles.
Simple formatting for VIEWs 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 objects code according to the SQL Editor formatting settings. For more info about the code formatting settings, see Formatting.
Alert if Java heap size less than recommended - allows the user to receive a warning if the amount of allocated memory is less than the recommended amount.
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.
Ignored 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 the user to invert black list to white list and the other way around.
To add an object to the “Ignored Objects” list, edit it or remove it from the list, use the
,
and
buttons respectively.
When you add or edit an object, a window will open where you’ll be able to select the required settings for the ignored object.
Settings of ignored objects
Pattern – consider the name of the object as regular expression.
Apply to contents – apply the rule for the matched object and all of its content.
Qualification – search objects by qualified name.
Type is object type. If no type is selected, the settings are applied to any object.
The selected settings will be displayed in the main “Ignored objects” window next to the object’s name.
Note
In this case, the list of excluded objects will be general and will apply its effect to all the projects present in the projects directory. For a detailed description of work with lists, see the Ignore List section.
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. Not supported with transactions in PostgreSQL) – allows creating indexes in the CONCURRENTLY mode in scripts.
Print CONSTRAINT NOT VALID - allows adding the
NOT VALIDstatement to the migration script for constraints.Print CREATE IF NOT EXISTS/DROP IF EXISTS allows to add the
IF NOT EXISTS/IF EXISTSstatement to the migration script in the object’s CREATE / DROP statement.Print creation of CONSTRAINT and IDENTITY in DO block (PostgreSQL only) - allows you to wrap the creation of CONSTARAINT and IDENTITY into the DO block (for PostgreSQL only)
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.
Print comments at the end of the script - moves the adding of all comments to the end of the migration 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.
Show code of all child objects when comparing - allows to display the code of all child objects on the comparison panel, even if there are no differences.
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 apply in the SQL editor
On the pgCodeKeeper -> SQL Editor -> SQL Editor Templates settings page you can manage SQL templates for the PostgreSQL, MS SQL and ClickHouse database objects 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, where you should specify the parameters of the connection data: host, port, database name, user, password, database group, connection type, as well as forbid recording to DB and select the PostgreSQL (for PostgreSQL or Greenplum), MS SQL or ClickHouse database type. 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.
Connection type
Settings configuring the connection type.
You can find the connection types list in pgCodeKeeper -> DB Store -> Connection type.
To upload the list from a file, click
Import and select the required file. You can also export the list to a separate file by clicking
Export. To add a connection type, click
. The Create new connection type dialog window will appear
Name is the name of a connection type displayed on the list in the drop-down list of the DB credentials dialog window DB Store.
Color is the color used to highlight the connection type on the DB storage list, on the toolbar and in the SQL editor