> Perhaps, but pg_attribute is the natural place to keep the column
> ordering info.
i don't know what pg_attribute is, but sound to me like it is a good
sollution.
> ISTM we talked months ago about adding an "attlognum" column to
> pg_attribute, which would be separate from "attnum" (the physical column
> position) and would be used by the backend only to determine the order
> of SELECT * expansion. Admin tools could use this to determine column
> display order too. It didn't get done, but it still seems like a
> reasonable idea to me.
it wouldn't matter much to me, if "select *" wouldn't be expanded in the
correct order, but it might worry other users.
the first thing to achieve is to define and offer a place where tools
can store the ordering information.
the second would be to make "select *" to use this information, although
this information should be well cached than if "select *" is expected
to be used often.