Re: tablecmds.c/MergeAttributes() cleanup
Peter Eisentraut <peter@eisentraut.org>
On 11.07.23 20:17, Alvaro Herrera wrote: > I spent a few minutes doing a test merge of this to my branch with NOT > NULL changes. Here's a quick review. > >> Subject: [PATCH 01/17] Remove obsolete comment about OID support > > Obvious, trivial. +1 > >> Subject: [PATCH 02/17] Remove ancient special case code for adding oid columns > > LGTM; deletes dead code. > >> Subject: [PATCH 03/17] Remove ancient special case code for dropping oid >> columns > > Hmm, interesting. Yay for more dead code removal. Didn't verify it. I have committed these first three. I'll leave it at that for now. >> Subject: [PATCH 08/17] Improve some catalog documentation >> >> Point out that typstorage and attstorage are never '\0', even for >> fixed-length types. This is different from attcompression. For this >> reason, some of the handling of these columns in tablecmds.c etc. is >> different. (catalogs.sgml already contained this information in an >> indirect way.) > > I don't understand why we must point out that they're never '\0'. I > mean, if we're doing that, why not say that they can never be \xFF? > The valid values are already listed. The other parts of this patch look > okay. While working through the storage and compression handling, which look similar, I was momentarily puzzled by this. While attcompression can be 0 to mean, use default, this is not possible/allowed for attstorage, but it took looking around three corners to verify this. It could be more explicit, I thought.
Commits
-
Fix segmentation fault in MergeInheritedAttribute()
- 8f0a97dfffc5 17.0 landed
-
Improve compression and storage support with inheritance
- 0413a556990b 17.0 cited
-
Split some code out from MergeAttributes()
- f7cf9494bad3 17.0 landed
-
MergeAttributes code deduplication
- 64444ce071f6 17.0 landed
-
Add a const decoration
- 924d046dcf55 17.0 landed
-
MergeAttributes: convert pg_attribute back to ColumnDef before comparing
- 4d969b2f85e1 17.0 landed
-
Refactor ATExecAddColumn() to use BuildDescForRelation()
- a1604237a6ff 17.0 landed
-
Move BuildDescForRelation() from tupdesc.c to tablecmds.c
- 04e485273b56 17.0 landed
-
Push attcompression and attstorage handling into BuildDescForRelation()
- 180e3394a704 17.0 landed
-
Push attidentity and attgenerated handling into BuildDescForRelation()
- 6d341407a6e3 17.0 landed
-
Add TupleDescGetDefault()
- ebf76f2753a9 17.0 landed
-
MergeAttributes() and related variable renaming
- b0ae29512c21 17.0 landed
-
Clean up MergeCheckConstraint()
- 369202bf4be6 17.0 landed
-
Clean up MergeAttributesIntoExisting()
- eddad679d2ab 17.0 landed
-
Remove useless if condition
- 6844d3275ac6 17.0 landed
- 689c66a84bb7 17.0 landed
-
Make more use of makeColumnDef()
- 1fa9241bdd0e 17.0 landed
-
Add some const decorations
- 2b088c8e4a2c 17.0 landed
-
Remove ancient special case code for dropping oid columns
- 7ef2912519fd 17.0 landed
-
Remove ancient special case code for adding oid columns
- 5eaa0e92ee2f 17.0 landed
-
Remove obsolete comment about OID support
- adf333b4edb2 17.0 landed