Re: Help with ADD COLUMN

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Help with ADD COLUMN
Date: 2002-11-24 20:35:46
Message-ID: 025801c293f9$11bbdf20$6500a8c0@internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > The one big programming difficulty I see is the process of running
through
> > all the existing tuples in the relation the column was added to and
> > evaluating the default for each row.
>
> Basically you wanna do an "UPDATE tab SET col = <default expr>". I'd
> suggest letting the existing machinery handle as much of that as
> possible.

Using SPI calls?

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-11-24 21:16:46 Re: Help with ADD COLUMN
Previous Message Bruce Momjian 2002-11-24 20:10:15 7.3RC2 please