feat: pgclone.diff() — schema DDL drift detection (v4.1.0) - #4
Merged
Conversation
…dba/pgclone into feature/v4.1.0-schema-diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #
Type of change
Description of changes
Database / SQL changes
sql/pgclone--<version>.sqlPG_FUNCTION_INFO_V1names in C match theAS '<lib>', '<sym>'clauses in SQL.sqlmatch the CPG_RETURN_*pathsCOMMENT ON FUNCTION ...added for new public functionsVOLATILE/STABLE/IMMUTABLE) andPARALLELsafety set correctlyTesting
PostgreSQL versions tested locally:
test/pgclone_test.sqlplan()count exactly matches the actual number of assertionstest/test_async.shortest/test_database_create.sh(if applicable)test/fixtures/seed.sqlupdated if new test objects are neededC code safety checklist
palloc/palloc0/pfreeonly — nomalloc/freePQconnectdbhas a matchingPQfinishin all paths (success and error)PQexecresult isPQclear-ed in all pathsquote_literal_cstr()andquote_identifier()StringInfoused for dynamic strings; no fixed stack buffers for SQLstrlcpyinstead ofstrcpy/strncpyereport/elogwith appropriate level — connection strings never logged atLOGlevel or above#if PG_VERSION_NUM >= XXXXXXd.adsrc, pre-PG15 shmem-request pattern, etc.)LWLockwhere neededDocumentation
CHANGELOG.mdupdated under the appropriate version headingdocs/USAGE.md/docs/ASYNC.md/docs/ARCHITECTURE.md/docs/TESTING.mdREADME.mdupdated if the change affects the user-facing feature list or quick-startVersion bump
pgclone.control(default_version)META.json(versionandprovides.pgclone.version+file)README.mdversion badgesql/pgclone--<old>--<new>.sqlmigration script (if applicable)CHANGELOG.mdhas a heading for the new versionBackward compatibility
Screenshots / sample output
Additional notes