> You could invent a syntax that supports both use cases, along the
> lines of
>
> ALTER ... POSITION <i> <column1> [ , <column2> ... ]
This idea is great, although the statement
ALTER TABLE <table> POSITION <i> <column>,<column>,...
might make the task to maintain the pg_attribute table more complicated
than the simple statement
ALTER TABLE <table> ALTER COLUMN <column> POSITION <i>
which can be transformed into 2 update-statements i think.
perhaps it would be simpler to define a statement like
ALTER TABLE <table> POSITIONS <column1> <i1>, <column2> <i2>, ...
which just means the following:
ALTER TABLE <table> ALTER COLUMN <oclumn1> POSITION <i1>
ALTER TABLE <table> ALTER COLUMN <oclumn2> POSITION <i2>
we wouldn't have such strong/complicated contraints for each <i>,
because each <i> can be >=1 and <= the column-count.
i don't know what i'd like most, but although your last suggestion looks
great, it makes it hard to estimate what's the result.