Re: logical column position

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical column position
Date: 2003-11-19 18:11:41
Message-ID: 1069265501.1739.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas,

On Wed, 2003-11-19 at 13:07, Andreas Pflug wrote:
> Dave Cramer wrote:
>
> >Andreas,
> >
> >The point of this is to maintain the column position. I don't think that
> >an alter of a column type should move the column position.
> >
> Why should ALTER COLUMN change the column number, i.e. position?

Rod's current proposed patch does that if you do an alter column alter
type. This is an artifact of the underlying mechanism. (ren old col, add
new col, update newcol=oldcol::newtype). Which is the point of the
logical column number discussion, and the todo item.

>
> >It may be that programmers should not rely on this, but it happens, and in very
> >large projects. If we can avoid unexpected side-affects like moving the
> >columns position, then I think we should.
> >
> >
> This is *expected* if behaviour if you delete and add columns; is there
> any DB system out there that allows to reshuffle the column ordering?

Yes, informix allows you to add the column before|after a column, and
mysql allows for add column after col. those are the only two I know
about.there could be more.
>
> Instead of some order-ordering facility it would be better to support
> all kinds of column type changes, not only binary compatible ones. This
> would help everybody, not only maintainers of ill-designed software.
>
> Regards,
> Andreas
>
>
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-11-19 18:18:28 Re: Build farm
Previous Message Andreas Pflug 2003-11-19 18:07:23 Re: logical column position