Normalize pg_git SQL object qualification and add search_path regression coverage#47
Merged
Merged
Conversation
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.
Motivation
search_pathand to make FK/DML targets unambiguous.search_pathis changed by callers or tests.Description
pg_git.<object>across core schema and function SQL, including table creation, FK constraints, DML, and queries.sql/schema/001-core.sql,sql/schema/pgit-schema.sql) to createpg_git.*tables and to referencepg_git.*in foreign keys and inserts.sql/functions/to usepg_git.repositories,pg_git.blobs,pg_git.trees,pg_git.commits,pg_git.refs,pg_git.remotes, andpg_git.remote_refswhere appropriate, while keeping non-object identifiers (e.g., therefscolumn alias inget_decorated_log) unchanged.test/sql/search_path_qualification_test.sqlthat setssearch_pathtopublicand validates init, stage/commit, commit persistence, and HEAD/master alignment still work.Testing
rg -nP "(?<!pg_git\.)\b(repositories|blobs|trees|commits|refs|remotes|remote_refs)\b" sql/schema sql/functionsto verify unqualified object names were removed, which succeeded.git commit) after staging, which succeeded and shows the SQL and test file were added/updated.test/sql/search_path_qualification_test.sqlto the test suite for automated execution by CI (the test file was created but the SQL test suite was not executed in this patch run).Codex Task