Documentation fix for adding a column with a default value

Started by Daniel Westermann (DWE)over 6 years ago8 messageshackers
Jump to latest
#1Daniel Westermann (DWE)
daniel.westermann@dbi-services.com

Hi,

the tip in the "Adding a column" section is not true anymore since PostgreSQL 11:

https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN

Attached a patch proposal for this.

Regards
Daniel

Attachments:

Outlook-2xwy31yy.pngimage/png; name=Outlook-2xwy31yy.pngDownload
Outlook-qq14ikuu.pngimage/png; name=Outlook-qq14ikuu.pngDownload
docfix.patchtext/x-patch; name=docfix.patchDownload+1-6
#2Daniel Westermann (DWE)
daniel.westermann@dbi-services.com
In reply to: Daniel Westermann (DWE) (#1)
Fw: Documentation fix for adding a column with a default value

______________________________________
From: Daniel Westermann (DWE)
Sent: Monday, July 15, 2019 13:01
To: pgsql-hackers@postgresql.org
Subject: Documentation fix for adding a column with a default value

Hi,

the tip in the "Adding a column" section is not true anymore since PostgreSQL 11:

https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN<https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN>

Attached a patch proposal for this.

Seems the first mail didn't make it ...

Regards
Daniel

Attachments:

docfix.patchtext/x-patch; name=docfix.patchDownload+1-6
#3Ian Lawrence Barwick
barwick@gmail.com
In reply to: Daniel Westermann (DWE) (#2)
Re: Fw: Documentation fix for adding a column with a default value

On Wed, 17 Jul 2019 at 15:42, Daniel Westermann (DWE) <
daniel.westermann@dbi-services.com> wrote:

______________________________________
From: Daniel Westermann (DWE)
Sent: Monday, July 15, 2019 13:01
To: pgsql-hackers@postgresql.org
Subject: Documentation fix for adding a column with a default value

Hi,

the tip in the "Adding a column" section is not true anymore since

PostgreSQL 11:

https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN

<https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN&gt;

Attached a patch proposal for this.

Seems the first mail didn't make it ...

Actually it did, I was about to reply to it :)

The suggested change pares down the "Tip" to more of a brief "Note", which
IMHO is a bit
terse for that section of the documentation (which has more of a tutorial
character),
and the contents of the original tip basically still apply for volatile
default values
anyway.

I've attached another suggestion for rewording this which should also make
the
mechanics of the operation a little clearer.

Regards

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

doc-alter-table-default-value-pg11.v1.patchapplication/octet-stream; name=doc-alter-table-default-value-pg11.v1.patchDownload+20-11
#4Daniel Westermann (DWE)
daniel.westermann@dbi-services.com
In reply to: Ian Lawrence Barwick (#3)
Re: Fw: Documentation fix for adding a column with a default value

Seems the first mail didn't make it ...

Actually it did, I was about to reply to it :)

The suggested change pares down the "Tip" to more of a brief "Note", which IMHO is a bit
terse for that section of the documentation (which has more of a tutorial character),
and the contents of the original tip basically still apply for volatile default values
anyway.

I've attached another suggestion for rewording this which should also make the
mechanics of the operation a little clearer.

Thank you, that better explains it. Looks good to me.

Regards
Daniel

#5Daniel Westermann (DWE)
daniel.westermann@dbi-services.com
In reply to: Daniel Westermann (DWE) (#4)
Re: Fw: Documentation fix for adding a column with a default value

The suggested change pares down the "Tip" to more of a brief "Note", which IMHO is a bit
terse for that section of the documentation (which has more of a tutorial character),
and the contents of the original tip basically still apply for volatile default values
anyway.

I've attached another suggestion for rewording this which should also make the
mechanics of the operation a little clearer.

Thank you, that better explains it. Looks good to me.

Shouldn't we add that to the current commit fest?

Regards
Daniel

#6Daniel Gustafsson
daniel@yesql.se
In reply to: Daniel Westermann (DWE) (#5)
Re: Documentation fix for adding a column with a default value

On 18 Jul 2019, at 17:46, Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> wrote:

The suggested change pares down the "Tip" to more of a brief "Note", which IMHO is a bit
terse for that section of the documentation (which has more of a tutorial character),
and the contents of the original tip basically still apply for volatile default values
anyway.

I've attached another suggestion for rewording this which should also make the
mechanics of the operation a little clearer.

Thank you, that better explains it. Looks good to me.

Shouldn't we add that to the current commit fest?

The current commitfest is closed for new additions, but please add it to the
next one (2019-09) and it will be picked up then.

cheers ./daniel

#7Ian Lawrence Barwick
barwick@gmail.com
In reply to: Daniel Gustafsson (#6)
Re: Documentation fix for adding a column with a default value

On 7/19/19 12:51 AM, Daniel Gustafsson wrote:

On 18 Jul 2019, at 17:46, Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> wrote:

The suggested change pares down the "Tip" to more of a brief "Note", which IMHO is a bit
terse for that section of the documentation (which has more of a tutorial character),
and the contents of the original tip basically still apply for volatile default values
anyway.

I've attached another suggestion for rewording this which should also make the
mechanics of the operation a little clearer.

Thank you, that better explains it. Looks good to me.

Shouldn't we add that to the current commit fest?

The current commitfest is closed for new additions, but please add it to the
next one (2019-09) and it will be picked up then.

To me it looks like a minor documentation correction to fix an omission
from a patch already in PostgreSQL.

Regards

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#8Michael Paquier
michael@paquier.xyz
In reply to: Ian Lawrence Barwick (#7)
Re: Documentation fix for adding a column with a default value

On Fri, Jul 19, 2019 at 09:04:03AM +0900, Ian Barwick wrote:

To me it looks like a minor documentation correction to fix an omission
from a patch already in PostgreSQL.

I think that it is better to register it in the commit fest anyway so
as we don't lose track of it. Things tend to get lost easily as this
list has a lot of traffic.

I have been looking at the original patch from Daniel and got
surprised by the simple removal of the paragraph as this applies to
16828d5c where using volatile defaults still require a table rewrite.
Well, this just comes back to the point raised by Ian upthread ;p

Except for a couple of misplaced and missing markups and one typo, the
new paragraph looked fine, so committed down to v11 after fixing the
whole.
--
Michael