Re: Fast AT ADD COLUMN with DEFAULTs - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Fast AT ADD COLUMN with DEFAULTs
Date
Msg-id CANP8+jK24gb=Ti_L2TZUenmQv8XQvya1Vz+zfmivDY6_mYLN1g@mail.gmail.com
Whole thread Raw
In response to Re: Fast AT ADD COLUMN with DEFAULTs  (Serge Rielau <serge@rielau.com>)
Responses Re: Fast AT ADD COLUMN with DEFAULTs  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
List pgsql-hackers
On 6 October 2016 at 04:43, Serge Rielau <serge@rielau.com> wrote:

>>> Or should I compose some sort of a design document?

Having read this thread, I'm a little unclear as to what you're
writing now, though there's definitely good ideas here.

I think it would be beneficial to write up a single coherent
description of this, including behaviour and a small sketch of
implementation, just so everyone knows what this is. No design doc,
but a summary.


It would be very useful to be able to do this...
ALTER TABLE foo ADD last_updated_timestamp timestamp default current_timestamp
so that it generates a constant value and stores that for all prior
rows, but then generates a new value for future rows.

Which makes me think we should call this missing_value or absent_value
so its clear that it is not a "default" it is the value we use for
rows that do not have any value stored for them.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
Next
From: Petr Jelinek
Date:
Subject: Re: autonomous transactions