On Fri, Dec 8, 2023 at 3:43 PM Dagfinn Ilmari Mannsåker <ilm...@ilmari.org> wrote: > > Hi hackers, > > I've always been annoyed by the fact that pg_get_serial_sequence takes > the table and returns the sequence as strings rather than regclass. And > since identity columns were added, the name is misleading as well (which > is even acknowledged in the docs, together with a suggestion for a > better name). > > So, instead of making excuses in the documentation, I thought why not > add a new function which addresses all of these issues, and document the > old one as a backward-compatibilty wrapper? > > Please see the attached patch for my stab at this. >
I reviewed the Patch and the compilation looks fine. I tested various scenarios and did not find any issues. Also I did RUN 'make check' and 'make check-world' and all the test cases passed successfully. I figured out a small typo please have a look at it:- This is the name the docs say `pg_get_serial_sequence` sholud have had, and gives us the opportunity to change the return and table argument types to `regclass` and the column argument to `name`, instead of using `text` everywhere. This matches what's in catalogs, and requires less explaining than the rules for `pg_get_serial_sequence`. Here 'sholud' have been 'should'. Thanks and Regards, Shubham Khanna.