Tom Lane <tgl@sss.pgh.pa.us> writes:
> "attpos" is a horrid choice of name, because no one will be able to
> remember which of "attnum" and "attpos" is which. Pick a more
> distinct name. Offhand the best thing I can think of is "attlognum"
> or "attlogpos".
Actually, I deliberately chose attpos rather than attlognum (which is
what some people had been calling this feature earlier). My reasoning
was that the "logical number" is really a nonsensical idea: we just
invented it on the spot. In contrast, a "position" is a fairly natural
thing for an attribute to have -- it's a notion with some counterpart
in the real world. To me, at least, it seems intuitive that an
"attnum" would identify a column whereas an "attpos" would specify the
column's position.
I'm happy to change the name if there's a consensus that attpos isn't
a good choice -- what does everyone think?
> What are you going to do with deleted columns? I'd be inclined to
> give them all attlogpos = 0, but that destroys your last comment.
I hadn't planned to do anything in particular for deleted columns:
since they are never displayed to the user, does it matter what their
attpos is?
In any event, the property that no two columns in a table have the
same logical number isn't important anyway.
> You have not presented any proposal for exactly what ALTER TABLE
> operations would be offered to manipulate the column positions.
I'd like to get the backend storage side of things implemented
first. I'll take a look at the archives before I do any UI work --
thanks for the suggestion.
-Neil