From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | ALTER TABLE ADD COLUMN fast default |
Date: | 2017-12-06 14:36:23 |
Message-ID: | 31e2e921-7002-4c27-59f5-51f08404c858@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
fast_default-v2.patch | text/x-patch | 102.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-12-06 14:41:57 | Re: [HACKERS] Transaction control in procedures |
Previous Message | Robert Haas | 2017-12-06 14:32:58 | Re: [HACKERS] parallel.c oblivion of worker-startup failures |