Re: Extended Statistics set/restore/clear functions. - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Extended Statistics set/restore/clear functions.
Date
Msg-id CADkLM=dwpSPt6yJfcBoZ_GGyVFZ4D5GCTsw3q8dTG+FVgMd8iA@mail.gmail.com
Whole thread Raw
In response to Re: Extended Statistics set/restore/clear functions.  (Yuefei Shi <shiyuefei1004@gmail.com>)
List 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 

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: index prefetching
Next
From: Jacob Champion
Date:
Subject: Re: RFC 9266: Channel Bindings for TLS 1.3 support