KS DB Merge Tools logo KS DB Merge Tools
Documentation
KS DB Merge Tools for PostgreSQL logo for PostgreSQL
 
KS DB Merge Tools for Oracle logo
KS DB Merge Tools for MySQL logo
MssqlMerge logo
KS DB Merge Tools for SQLite logo
AccdbMerge logo
KS DB Merge Tools for Cross-DBMS logo

View Definition Diff Tab

  • Opened from: Object list tab
  • Applicable tab-specific toolbar actions:
    • Export to Xlsx or Json
    • Jump to the last, next, previous, first change
    • Select all, none, invert selection on the left, all, none, invert selection on the right side
    • Merge left selected items to the right side, right selected items to the left side
    • Delete selected items on the right side, selected items on the right side
  • Applicable object types: Views and Materialized views

This tab allows to compare definition of particular view or materialized view:

for PostgreSQL, view definition diff tab

Tab is divided into 4 major collapsible sections (View definition, Indexes for materialized views or Triggers for views, Options, and Columns) and bottom grid/text preview of the selected item. Column list is driven by the query definition SELECT statement. Column changes are highlighted but they do not affect the result of checking whether the view is changed or not. 'SELECT * ..' kind of view can be counted as non-changed if the view definition text is the same, but the column list can be different because of changes in the underlying tables. Columns can be shown in the one of two modes:

  • Natural order - column are shown in the order they are returned by the view
  • Sorted by name

Comments

The Options section has 2 columns: Name and Value. Its only row is COMMENT, the view comment. It is shown if at least one view has a comment, the other side has an empty value. The Indexes, Triggers and Columns sections have the Comment column.

When only a comment is changed, merge uses only COMMENT ON, the object is not re-created. When the view definition is merged, the view is dropped and created again, so its comments are set again after the create: the source comments for the selected COMMENT and Columns rows, otherwise the target comments are kept.

The Columns section is marked as MERGE COMMENTS ONLY: only comments of the selected columns are merged, a new or deleted column comes only with the view definition. In this case the Execute script dialog shows a warning. Comments are compared and merged only if the 'Compare comments' option is enabled in Settings, otherwise they are only shown and the Columns section is marked as DIFF ONLY.

Vertical toolbar between two panels contains additional tab-specific actions:

  • 'Open view definition as text' opens text diff tab with a view script
  • Open data diff for the current view
  • Open data diff for the current view filtered only to new and changed records
  • opens query result diff with select top 1000 records statement for this view

When bottom text preview is active (for view definition, index or trigger), it contains two more actions:

  • Show tab and space characters (the state of this toggle is synchronized with the same toggle in the Text diff tab)
  • Show line numbers (the state of this toggle is synchronized with the same toggle in the Text diff tab)
  • Show text preview line totals
  • Show text preview selected line

Last updated: 2026-10-23