On Wed, Aug 20, 2025 at 07:16:55PM +0530, vignesh C wrote: > pg_sequences and pg_sequence_last_value return NULL for last_value, > which aligns with the expectation that the sequence hasn't been used > yet. However, pg_get_sequence_data returns the start value (1) even > though is_called is false. This seems inconsistent. I felt > pg_get_sequence_data should also return NULL for last_value in this > case to match the others. > Attached patch has a fix for the same. Thoughts?
This function returns the values in the sequence tuple, primarily for pg_dump (see commit bd15b7d). IIUC your patch would break pg_dump on v18 and newer versions. -- nathan
