Re: tablecmds.c/MergeAttributes() cleanup

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-10-05T15:49:24Z
Lists: pgsql-hackers
On 19.09.23 15:11, Peter Eisentraut wrote:
> Here is an updated version of this patch set.  I resolved some conflicts 
> and addressed this comment of yours.  I also dropped the one patch with 
> some catalog header edits that people didn't seem to particularly like.
> 
> The patches that are now 0001 through 0004 were previously reviewed and 
> just held for the not-null constraint patches, I think, so I'll commit 
> them in a few days if there are no objections.
> 
> Patches 0005 through 0007 are also ready in my opinion, but they haven't 
> really been reviewed, so this would be something for reviewers to focus 
> on.  (0005 and 0007 are trivial, but they go to together with 0006.)
> 
> The remaining 0008 and 0009 were still under discussion and contemplation.

I have committed through 0007, and I'll now close this patch set as 
"Committed", and I will (probably) bring back the rest (especially 0008) 
as part of a different patch set soon.




Commits

  1. Fix segmentation fault in MergeInheritedAttribute()

  2. Improve compression and storage support with inheritance

  3. Split some code out from MergeAttributes()

  4. MergeAttributes code deduplication

  5. Add a const decoration

  6. MergeAttributes: convert pg_attribute back to ColumnDef before comparing

  7. Refactor ATExecAddColumn() to use BuildDescForRelation()

  8. Move BuildDescForRelation() from tupdesc.c to tablecmds.c

  9. Push attcompression and attstorage handling into BuildDescForRelation()

  10. Push attidentity and attgenerated handling into BuildDescForRelation()

  11. Add TupleDescGetDefault()

  12. MergeAttributes() and related variable renaming

  13. Clean up MergeCheckConstraint()

  14. Clean up MergeAttributesIntoExisting()

  15. Remove useless if condition

  16. Make more use of makeColumnDef()

  17. Add some const decorations

  18. Remove ancient special case code for dropping oid columns

  19. Remove ancient special case code for adding oid columns

  20. Remove obsolete comment about OID support