dbeaver / dbeaver/dbeaver

Structure compare more options needed

Open
#22,398 2 comments 0 reactions 0 assignees View on GitHub
xf:simple compare
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 13h
Merged PRs (30d)
183

Description

**Is your feature request related to a problem? Please describe.**
When comparing my dev-db with my staging-db through the structure compare tool, I always get _all_ procedures and triggers marked as being different, just because the "definer" is different and, depending on the target db, sometimes the trigger/sp name is enclosed in backticks and sometimes not.

In addition, i am not sure, what exactly causes the difference, maybe the line breaks, but even triggers with IDENTICAL source code (compared manually in notepad++) were shown as being different. Must be some invisible characters, line breaks, whatever.
However, in its current state, the compare tool is not really usable as the results are all but reliable.

**Describe the solution you'd like**
Either ignore the definer and backticks or add options to do so for each compare

**Describe alternatives you've considered**
I have compared manually with notepad++, both triggers (source code) was _identical_ but the compare tool still marked it as being different.

**Additional context**
A simple "string1 == string2" compare is not a valid comparison.
I suggest, you reformat both sources with a specific algo, like removing definer, normalizing line-breaks (or even just remove them for comparison and replace them with a blank character.
Normalize text on both ends before you do a string compare.

thanks for reading!
cheers, G

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.