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

From Tom Lane
Subject Re: Help with ADD COLUMN
Date
Msg-id 24319.1038119292@sss.pgh.pa.us
Whole thread Raw
In response to Help with ADD COLUMN  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: quote_ident and schemas (was Re: connectby with schema)
Next
From: Philip Warner
Date:
Subject: Re: Help with ADD COLUMN