Re: logical column position

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical column position
Date: 2003-11-21 00:10:24
Message-ID: 877k1ua8en.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew T. O'Connor 2003-11-21 00:40:15 Re: [HACKERS] More detail on settings for pgavd?
Previous Message Tom Lane 2003-11-21 00:07:41 Re: logical column position