Re: logical column position

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Dave Cramer <davec(at)fastcrypt(dot)com>
Subject: Re: logical column position
Date: 2003-11-17 17:07:24
Message-ID: Pine.LNX.4.44.0311171805260.12502-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway writes:

> (b) Using the above scheme that attnum == attpos initially, there
> won't be any gaps in the sequence of attpos values. That means
> that if, for example, we want to move the column in position 50
> to position 1, we'll need to change the position's of all the
> columns in positions [1..49] (and suffer the resulting MVCC
> bloat in pg_attribute). Changing the column order is hardly a
> performance critical operation, so that might be acceptable.

I don't think you can speak of "bloat" for pg_attribute. But you can
speak of a problem when you want to do the old col = col + 1 in the
presence of a unique index.

> (c) Do I need to consider inheritance?

Inheritance is based on column names, so initially no, but if there is a
command to alter the column order, then it should have an ONLY option.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Jensen 2003-11-17 17:13:15 Re: logical column position
Previous Message Adam Witney 2003-11-17 16:59:59 Re: 7.4 make failure on OSX ... Please ignore