Re: full featured alter table?

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Sven Köhler <skoehler(at)upb(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: full featured alter table?
Date: 2003-06-15 10:33:28
Message-ID: Pine.LNX.4.21.0306151108270.3121-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 15 Jun 2003, Sven Köhler wrote:

> >>what are you talking about? it is not _my_ frontend!
> >>we're talking about "frontends" like pgAdmin, phpPgAdmin etc.
> >
> > yes. why couldnt they simply use an extra table for this - just
> > like pgaccess does for storing its config ?
> > user-side column odering is frontend stuff.
> > it dont like the idea that SELECT * doesnt use the physical order
> > (from pg_attribute - which you also can see w/ \d in the pgsql frontend)
>
> so why don't you like it to use the user-defined order? do _you_ use
> "select *" ?
> BTW: if you change the user-defined order, it will match the physical
> order, so you it's something you don't have to care about.
>
> If the postgresql-team decides, that the column-order is not to be
> stored in the sys-tables, that it woul be the last step to store it in
> some other tables, but that is the worst step, as each tool will surely
> have it own tables etc. if it ones to support column ordering.
>
> if you think that column-ordering is just luxury, than i might remind
> you, table-names and column-names are just luxury too ;-)

Well, on the basis that column ordering is presentation issue it does belong in
the frontend. However, as Tom pointed out this discussion was had a few
months. I can't remember the outcome but apparently a suggestion was to have a
column in pg_attribute giving the presentational order.

The archives throw up:
http://archives.postgresql.org/pgsql-hackers/2002-09/msg00966.php however I
don't think Christopher has completely covered the issues.

The idea for implementing this is so tools, such as pgaccess, can list a
table's columns in some arbitrary order, presumably by someone displaying the
table and drag and dropping a column from one position to another. What about
the support for that? To change pg_attribute the tool has to be connected as a
superuser or there has to be some command, probably part of ALTER TABLE? And
then there is the issue of priviledge to use that, you don't want the column
order as shown to you changed just because some other person wanted to see them
in a different order. Imagine if both were working at the same time and
continually trying to get the display order they want.

--
Nigel J. Andrews

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-06-15 10:35:59 Re: Growing Database Size
Previous Message Avi Schwartz 2003-06-15 06:45:21 Re: Unknown kind of return type specified for function