CODE_STYLE.md: prefer %TYPE over a hardcoded type for column mirrors - #9
Merged
jnasbyupgrade merged 2 commits intoAug 10, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
An agent working on test_factory#18 replaced an intentional tbl.col%TYPE reference with a hardcoded type, treating the resulting "type reference ... converted to text" NOTICE as a bug rather than expected behavior. Document the convention so it isn't repeated.
The client_min_messages behavior this NOTICE detail was explaining now has its own section (see Postgres-Extensions#11); keep this section focused on the %TYPE convention itself.
jnasbyupgrade
force-pushed
the
prefer-type-reference
branch
from
August 10, 2026 23:15
8a46d0b to
143a08a
Compare
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
table.column%TYPEover a hardcoded type when a parameter/variable/column mirrors an existing column.%TYPEreference by replacing it with the literal type it currently resolves to.Why
An agent working on Postgres-Extensions/test_factory#18 replaced an intentional
%TYPEreference with a hardcoded type mid-PR. It was reverted in a later commit on that same PR. Documenting the convention here so other agents/engineers don't repeat it.(NOTICE-noise handling from
%TYPE/CREATE EXTENSION lives separately in Postgres-Extensions/ai#11 — assumed to merge before this one.)