pgadmin-org / pgadmin-org/pgadmin4
Diff - identity Columns & Comments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
Whenever I do a diff between two schemas that should be identical, the process finds that the identity column definitions are sometimes different . It would be nice to be able to ignore the settings like the START value.
However, whenever there is a difference in the identity definition, the associated column comment is dragged into the mix as being different too.
Here are the definitions on the source:
status_entry_id integer NOT NULL GENERATED ALWAYS AS IDENTITY (INCREMENT 1 START 0 MINVALUE 0 MAXVALUE 2147483647 CACHE 3)
COMMENT ON COLUMN survey.application_status.status_entry_id IS 'A value to ensure that the primary key has a unique value.';
Here are the definitions on the target:
status_entry_id integer NOT NULL GENERATED ALWAYS AS IDENTITY (INCREMENT 1 START 7482970 MINVALUE 0 MAXVALUE 2147483647 CACHE 3)
COMMENT ON COLUMN survey.application_status.status_entry_id IS 'A value to ensure that the primary key has a unique value.';
The comment ddl is exactly the same between source and target, but because the START value between source and target is different, both the column and the column comment are flagged as being different.
To Reproduce
Steps to reproduce the behavior:
- create a table with an identity column in two different databases
- Add identical column comments to the identity column in both databases
- Change the start value of the identity in the target table
- Run a diff on the table
- You will see that the comment definition is flagged as being different between the 2 tables.
Expected behavior
A clear and concise description of what you expected to happen.
Error message
If possible, include the full, unedited text of any error messages displayed.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 11
- pgAdmin version: 9.1.7
- Mode: Desktop
- Package type: [e.g. RPM, DEB, Python, Container, etc.]
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the schema diff with identical column comments and different identity START values in two PostgreSQL databases, as described in the issue. Trace the pgAdmin schema-diff handling for identity definitions and column comments. Done means the differing identity setting can be reported without incorrectly flagging the identical column comment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100