-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/6240~1
head repository: postgresql-cfbot/postgresql
compare: cf/6240
- 5 commits
- 7 files changed
- 2 contributors
Commits on Dec 1, 2025
-
Add appendStringInfoIdentifier() to avoid intermediate quoting buffers
Introduce appendStringInfoIdentifier() and appendStringInfoQualifiedIdentifier(), helper functions that append an SQL identifier directly to a StringInfo while applying quoting rules when necessary. This avoids allocating and copying through temporary palloc buffers, as currently happens with quote_identifier() when used together with appendStringInfoString(). The new functions improve both readability and efficiency of call sites that construct SQL fragments, especially those that need to build qualified names such as schema.table. Convert several existing callers in objectaddress.c, explain.c and ruleutils.c to use appendStringInfoIdentifier() / appendStringInfoQualifiedIdentifier() as examples. No functional behavior change is intended. Author: Chao Li <lic@highgo.com> Discussion: https://postgr.es/m/CAEoWx2=g2RVkxXB=JzWphgfg4QGV+spaA3PQ1rBM2iMehrVvjg@mail.gmail.com
Chao Li (Evan) authored and Commitfest Bot committedDec 1, 2025 Configuration menu - View commit details
-
Copy full SHA for c21339a - Browse repository at this point
Copy the full SHA c21339aView commit details -
Use appendStringInfoIdentifier() throughout ri_triggers.c
Replace most uses of quoteOneName() and manual stack buffers in ri_triggers.c with appendStringInfoIdentifier() and related infrastructure. This simplifies the construction of SQL queries generated by RI triggers and eliminates the need for MAX_QUOTED_NAME_LEN / stack-allocated intermediate buffers. It also removes several code paths where identifiers were quoted manually, making the quoting rules consistent with ruleutils.c and the GUC quote_all_identifiers. This commit also adjusts generate_operator_clause() to support prefixed arguments and identifier quoting directly, reducing the number of places where callers need to inject string concatenation logic. No user-visible behavior change is intended; the generated SQL should be equivalent to the previous version. Author: Chao Li <lic@highgo.com> Discussion: https://postgr.es/m/CAEoWx2=g2RVkxXB=JzWphgfg4QGV+spaA3PQ1rBM2iMehrVvjg@mail.gmail.com
Chao Li (Evan) authored and Commitfest Bot committedDec 1, 2025 Configuration menu - View commit details
-
Copy full SHA for 19e6be4 - Browse repository at this point
Copy the full SHA 19e6be4View commit details -
Remove quoteOneName() and related buffer-sizing macros from ri_trigge…
…rs.c After the previous refactoring, quoteOneName() and its callers are no longer needed. Remove the function along with MAX_QUOTED_NAME_LEN, MAX_QUOTED_REL_NAME_LEN, and quoteRelationName(), and introduce appendRelationName() as the remaining helper for writing qualified relation names using appendStringInfoQualifiedIdentifier(). This reduces redundant quoting code and centralizes identifier handling in appendStringInfoIdentifier() / appendStringInfoQualifiedIdentifier(), making RI triggers consistent with other code that generates SQL fragments. No functional behavior change is expected. Author: Chao Li <lic@highgo.com> Discussion: https://postgr.es/m/CAEoWx2=g2RVkxXB=JzWphgfg4QGV+spaA3PQ1rBM2iMehrVvjg@mail.gmail.com
Chao Li (Evan) authored and Commitfest Bot committedDec 1, 2025 Configuration menu - View commit details
-
Copy full SHA for f06b3e4 - Browse repository at this point
Copy the full SHA f06b3e4View commit details -
Use appendStringInfoIdentifier() in more places.
Author: Chao Li <lic@highgo.com> Discussion: https://postgr.es/m/CAEoWx2=g2RVkxXB=JzWphgfg4QGV+spaA3PQ1rBM2iMehrVvjg@mail.gmail.com
Chao Li (Evan) authored and Commitfest Bot committedDec 1, 2025 Configuration menu - View commit details
-
Copy full SHA for cd750b2 - Browse repository at this point
Copy the full SHA cd750b2View commit details -
[CF 6240] v4 - quoteOneName() inconsistency with quote_all_identifier…
…s — replacement API proposed: appendStringInfoIdentifier This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/6240 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAEoWx2m0v=n2CgonU3Tz1GOj1=dFWu9YcBPc6v-pJi2LYxG9Zw@mail.gmail.com Author(s): Chao Li
Commitfest Bot committedDec 1, 2025 Configuration menu - View commit details
-
Copy full SHA for f19359a - Browse repository at this point
Copy the full SHA f19359aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/6240~1...cf/6240