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

Re: [HACKERS] ALTER TABLE ... ADD COLUMN

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] ALTER TABLE ... ADD COLUMN
Date: 2002-10-05 08:46:23
Message-ID: 20021005044623.7489cb32.alvherre@atentus.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
En Fri, 4 Oct 2002 18:21:06 -0400
Alvaro Herrera <alvherre(at)atentus(dot)com> escribió:

> Huh, I don't know where I got the idea you were (or someone else was?)
> in the position that attislocal should be reset.  I'll clean everything
> up and submit the patch I had originally made.

All right, this is it.  This patch merely checks if child tables have
the column.  If atttypid and atttypmod are the same, the attributes'
attinhcount is incremented; else the operation is aborted.  If child
tables don't have the column, recursively add it.

attislocal is not touched in any case.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"El Maquinismo fue proscrito so pena de cosquilleo hasta la muerte"
(Ijon Tichy en Viajes, Stanislaw Lem)

Attachment: addcolumn-inh-2.patch
Description: application/octet-stream (2.6 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Gavin SherryDate: 2002-10-05 09:44:15
Subject: Branch prediction
Previous:From: Mats LofkvistDate: 2002-10-05 08:46:03
Subject: Use of sync() [was Re: Potential Large Performance Gain in WAL synching]

pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-10-06 04:36:07
Subject: Allow SET to not start a transaction
Previous:From: Alvaro HerreraDate: 2002-10-04 22:21:06
Subject: Re: ALTER TABLE ... ADD COLUMN

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