Re: Extended Statistics set/restore/clear functions.
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Yuefei Shi <shiyuefei1004@gmail.com>
Cc: jian he <jian.universality@gmail.com>,
Michael Paquier <michael@paquier.xyz>, Tomas Vondra <tomas@vondra.me>, pgsql-hackers@lists.postgresql.org,
tgl@sss.pgh.pa.us
Date: 2025-11-21T22:41:15Z
Lists: pgsql-hackers
> > > A few small comments. > > 1. Minor typo fixes: > +1 Thanks. > 2.Code maintainability suggestion: > I noticed the string "malformed pg_dependencies: "%s"" is used repeatedly > throughout the code. Would you consider defining this as a macro? This > could reduce duplication and make future updates easier. > It seems to be the way of things. As I stated earlier, what I'd really like is the ability to form different errdetails and have them feed into one errsave(), and still have the strings go through translation. > > 3.Memory management observation: > Regarding item_attnum_list, while PostgreSQL's memory context mechanism > handles cleanup, explicitly freeing the allocated memory after use might > improve code clarity. > > These are all minor points - the implementation looks solid overall. Thank > you for your work on this feature! > +1