Skip site navigation (1) Skip section navigation (2)

Re: preliminary: logical column order

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To:
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: preliminary: logical column order
Date: 2003-11-30 16:33:45
Message-ID: 3FCA1BE9.3030508@pse-consulting.de (view raw or flat)
Thread:
Lists: pgsql-patches
I wonder if it wouldn't be easier to reorder the TupDesc->attrs[] array
according to an attphysid when filling the TupDesc structure, right
after a column was dropped/recreated (before any indexes/constraints are
recreated), so attnum remains, while storage changes.

Example:

before:
attnum   attphysid  attname attisdropped

1         1         foo           f
2         2         bar           f

after drop/recreate col:
1         3         foo           f
2         2         bar           f
3         1         foo_del       t

resulting in an attrs array
attrs[0] describing physical col 3
attrs[1] describing physical col 2
attrs[2] describing physical col 1



Regards,
Andreas



In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2003-11-30 17:18:42
Subject: Re: clock_timestamp() and transaction_timestamp() function
Previous:From: Bruce MomjianDate: 2003-11-30 16:04:25
Subject: Re: [BUGS] Bug in byteaout code in all PostgreSQL versions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group