ALTER TABLE ADD COLUMN fast default - Mailing list pgsql-hackers

From Andrew Dunstan
Subject ALTER TABLE ADD COLUMN fast default
Date
Msg-id 31e2e921-7002-4c27-59f5-51f08404c858@2ndQuadrant.com
Whole thread Raw
Responses Re: ALTER TABLE ADD COLUMN fast default  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Attached is a patch for $subject. It's based on Serge Reilau's patch of
about a year ago, taking into account comments made at the time. with
bitrot removed and other enhancements such as documentation.

Essentially it stores a value in pg_attribute that is used when the
stored tuple is missing the attribute. This works unless the default
expression is volatile, in which case a table rewrite is forced as
happens now.

Comments welcome.


cheers


andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] parallel.c oblivion of worker-startup failures
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Transaction control in procedures