Re: RE : full featured alter table? - Mailing list pgsql-general

From Sven Köhler
Subject Re: RE : full featured alter table?
Date
Msg-id 3EEE513D.9040707@upb.de
Whole thread Raw
In response to Re: RE : full featured alter table?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
 > 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.



pgsql-general by date:

Previous
From: "Nikolaus Dilger"
Date:
Subject: Re: [PERFORM] Interesting incosistent query timing
Next
From: Tom Lane
Date:
Subject: Re: Is it bug ?