[Patch]: Documentation of ALTER TABLE re column type changes on binary-coercible fields

2020-01-28 Thread Mike Lissner
Hi all, I didn't get any replies to this. Is this the right way to send in
a patch to the docs?

Thanks,


Mike

On Thu, Jan 23, 2020 at 11:01 PM Mike Lissner <
mliss...@michaeljaylissner.com> wrote:

> Hi, first patch here and first post to pgsql-hackers. Here goes.
>
> Enclosed please find a patch to tweak the documentation of the ALTER TABLE
> page. I believe this patch is ready to be applied to master and backported
> all the way to 9.2.
>
> On the ALTER TABLE page, it currently notes that if you change the type of
> a column, even to a binary coercible type:
>
> > any indexes on the affected columns must still be rebuilt.
>
> It appears this hasn't been true for about eight years, since 367bc426a.
>
> Here's the discussion of the topic from earlier today and yesterday:
>
>
> https://www.postgresql.org/message-id/flat/CAMp9%3DExXtH0NeF%2BLTsNrew_oXycAJTNVKbRYnqgoEAT01t%3D67A%40mail.gmail.com
>
> I haven't run tests, but I presume they'll be unaffected by a
> documentation change.
>
> I've made an effort to follow the example of other people's patches I
> looked at, but I haven't contributed here before. Happy to take another
> stab at this if this doesn't hit the mark — though I hope it does. I love
> and appreciate Postgresql and hope that I can do my little part to make it
> better.
>
> For the moment, I haven't added this to commitfest. I don't know what it
> is, but I suspect this is small enough somebody will just pick it up.
>
> Mike
>
Index: doc/src/sgml/ref/alter_table.sgml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===
--- doc/src/sgml/ref/alter_table.sgml	(revision 6de7bcb76f6593dcd107a6bfed645f2142bf3225)
+++ doc/src/sgml/ref/alter_table.sgml	(revision 9a813e0896e828900739d95f78b5e4be10dac365)
@@ -1225,10 +1225,9 @@
 existing column, if the USING clause does not change
 the column contents and the old type is either binary coercible to the new
 type or an unconstrained domain over the new type, a table rewrite is not
-needed; but any indexes on the affected columns must still be rebuilt.
-Table and/or index rebuilds may take a
-significant amount of time for a large table; and will temporarily require
-as much as double the disk space.
+needed. Table and/or index rebuilds may take a significant amount of time
+for a large table; and will temporarily require as much as double the disk
+space.

 



Patching documentation of ALTER TABLE re column type changes on binary-coercible fields

2020-01-23 Thread Mike Lissner
Hi, first patch here and first post to pgsql-hackers. Here goes.

Enclosed please find a patch to tweak the documentation of the ALTER TABLE
page. I believe this patch is ready to be applied to master and backported
all the way to 9.2.

On the ALTER TABLE page, it currently notes that if you change the type of
a column, even to a binary coercible type:

> any indexes on the affected columns must still be rebuilt.

It appears this hasn't been true for about eight years, since 367bc426a.

Here's the discussion of the topic from earlier today and yesterday:

https://www.postgresql.org/message-id/flat/CAMp9%3DExXtH0NeF%2BLTsNrew_oXycAJTNVKbRYnqgoEAT01t%3D67A%40mail.gmail.com

I haven't run tests, but I presume they'll be unaffected by a documentation
change.

I've made an effort to follow the example of other people's patches I
looked at, but I haven't contributed here before. Happy to take another
stab at this if this doesn't hit the mark — though I hope it does. I love
and appreciate Postgresql and hope that I can do my little part to make it
better.

For the moment, I haven't added this to commitfest. I don't know what it
is, but I suspect this is small enough somebody will just pick it up.

Mike
Index: doc/src/sgml/ref/alter_table.sgml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===
--- doc/src/sgml/ref/alter_table.sgml	(revision 6de7bcb76f6593dcd107a6bfed645f2142bf3225)
+++ doc/src/sgml/ref/alter_table.sgml	(revision 9a813e0896e828900739d95f78b5e4be10dac365)
@@ -1225,10 +1225,9 @@
 existing column, if the USING clause does not change
 the column contents and the old type is either binary coercible to the new
 type or an unconstrained domain over the new type, a table rewrite is not
-needed; but any indexes on the affected columns must still be rebuilt.
-Table and/or index rebuilds may take a
-significant amount of time for a large table; and will temporarily require
-as much as double the disk space.
+needed. Table and/or index rebuilds may take a significant amount of time
+for a large table; and will temporarily require as much as double the disk
+space.