pgCodeKeeper basic settings¶
- Use pg_dump DB loader instead of JDBC - use pg_dump instead of JDBC to load the database.
- pg_dump executable - path to the pg_dump utility or any other executable file or script which realizes the pg_dump interface.
- pg_dump custom parameters - allows to set additional settings for the pg_dump utility activation.
- Use pg_dbo_timestamp extension - allows to use the extension pg_dbo_timestamp. This extension allows to speed up the loading of database schemas, as well as to display the column with the data base user, which made the latest changes into the object, in the editor.
- 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.
- Reuse compare editor instead of opening new ones - allows to use the alerady running comparison editor for comparing database objects (Select Show differences in the right-click menu of the differnces table).
You can specify the objects that should not be considered when comparing datebases ont the pgCodeKeeper -> Excluded objects settings page.
To add or remove an object to the list of excluded, use the and buttons respectively.
When adding an object to the list of excluded you can set additional settings which will affect the object excluding during comparison:
- Template – whether or not the object’s name is a regular expression.
- Ignore content – allows to skip the objects contained in the excluded one.
- Type – object type (“ALL” is used for specifying any object type).
All the list settings are adjustable.
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 List of excluded objects.
The Black list - White list switch allows to invert black list to white list and the other way around.
Examples of work with excluded objects
Suppose there is a view named ignore4 and a set of tables with the names: ignore, ignore2, ignore3. In its turn, ignore2 contains the idx2 index.
|List of excluded objects||Result|
|Excluding the objects partially falling under the regular expression “ignore”|
|Excluding the “ignore2” objects with the content|
Excluding the objects with the “TABLE” type partially falling under
the regular expression “ignore”
Settings managing the database updates.
On the pgCodeKeeper -> DB update 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 containig: - 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 … in CONCURRENTLY mode – in scripts, allows to create indexes in CONCURRENTLY mode. Such indexes are impossible to create in the transaction block.
- Migration command - allows to use another utility or bootup options when applying migration script to the database.
Settings managing the project update.
On the pgCodeKeeper-> Project update settings page you can enable object dependences consideration during the project updating. This will complement the migration dialogue of the selected objects to the project with thier dependences without which the migration to the project may occur with errors.
Settings managing the usage reports.
On the pgCodeKeeper -> Usage reports 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 Values sent field.
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.
Settings managing the SQL editor.
On the pgCodeKeeper -> SQL editor settings page you can adjust the options of the SQL editor.
- 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.
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.
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.
Click to add a storage. The DB credentials dialog will appear (DB connection data), in which you should specify the parameters of the connection data: host, port, DB name, user, password. You can specify the name of the record manually. To do this, uncheck Auto-generate.
List of excluded objects can be connected as an external file.
You can add the parameters specified at https://jdbc.postgresql.org/documentation/head/connect.html to the connection properties.
To add a storage basing on the data from an already created storage, you should highlight the database storage object and click . 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 . 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 .
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.
To save the changes, you should click Apply or Apply and Close in the DB connection parameters storage, on the settings page.