Rod Taylor <[EMAIL PROTECTED]> writes: > On Mon, 2003-11-17 at 20:24, Christopher Kings-Lynne wrote: >> BTW, one main consideration is that all the postgres admin apps will now >> need to support ORDER BY attlognum for 7.5+.
> Yeah... how about maintaining attnum for the logical attribute number > and create an attphysnum or something for the physical position instead? > This is more intrusive into the source, but you don't need to teach new > tricks to external entities. > [ and similar remarks from other people elsewhere in the thread ] It's completely fallacious to imagine that we could make this change be transparent to external applications. To take two examples: 1. How many places do you think know that pg_attribute.attnum links to pg_attrdef.adnum? pg_dump, psql, and the JDBC driver all appear to know that, in a quick search of the CVS tree; I haven't even bothered to look at pgadmin and the other apps that are likely to have such dependencies. 2. How about linking pg_attribute.attnum to entries in pg_index.indkey? Lots of apps know about that too. Unless you are going to change the meanings of pg_index.indkey and pg_attrdef.adnum, you can't simply redefine attnum as a logical column position. And if you do make such a change you will break code elsewhere. If we add a *new* column attlogpos, without changing the semantics of attnum, then I think we have a fighting chance of making this work without an undue amount of effort. I see no prospect that we can change the meaning of attnum without breaking things far and wide. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend