Re: Help with ADD COLUMN - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Help with ADD COLUMN
Date
Msg-id 025801c293f9$11bbdf20$6500a8c0@internal
Whole thread Raw
In response to Help with ADD COLUMN  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Help with ADD COLUMN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> "Christopher Kings-Lynne" <chriskl@familyhealth.com.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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: 7.3RC2 please
Next
From: Tom Lane
Date:
Subject: Re: Help with ADD COLUMN