v18+ fixes and compiler warning fix#85
Open
devrimgunduz wants to merge 2 commits into
Open
Conversation
* AT_CheckNotNull was silently merged into AT_SetNotNull as of PostgreSQL 18
(commit 14e87ffa0f, "Make NOT NULL constraints implicit from column
definition proper constraints"). The existing guard only excluded PG < 12,
so the case label compiled against PG 12–17 but broke on PG 18+ with:
error: use of undeclared identifier 'AT_CheckNotNull'
error: duplicate case value 'AT_SetNotNull'
Narrow the guard to PG 12–17 only: >= 120000 && < 180000.
Affected versions: PG 18, PG 19 (and any future major release)
Fix: tighten the preprocessor guard on AT_CheckNotNull in ddl_deparse.c
* pgl_ddl_deploy_debug_query_string is used exclusively within pgl_ddl_deploy.c and was never intended to be exported. Declaring it without 'static' triggers -Wmissing-variable-declarations, which is enabled in PostgreSQL's default CFLAGS and treated as a warning (not an error) but is noisy and wrong on principle. Mark the variable 'static' to give it internal linkage, matching its actual usage and silencing the warning cleanly. Coded by Claude, tested by me.
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.
PG 18 and 19 fixes & fix compiler warning
Per pgdg-packaging/pgdg-rpms#213