From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Minor correction in alter_table.sgml |
Date: | 2016-12-22 15:07:57 |
Message-ID: | 20161222150756.GP18360@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> >> I had considered removing those but thought that some users might think
> >> that they're only "altering" one table and therefore felt it made sense
> >> to keep those explicitly listed.
>
> > I agree with Stephen; it's not crystal clear from the user's POV that
> > the command is altering two tables. It's worth mentioning this
> > explicitly; otherwise this is just a documented gotcha.
>
> Well, it already is shown explicitly in the syntax summary. The text
> is simply trying to restate that in an easily remembered fashion, and
> the more exceptions, the harder it is to remember. You might as well
> forget trying to provide a rule at all and just say something like
> "Most forms of ALTER TABLE can be combined, except as shown in the
> syntax diagram."
I do wonder if perhaps we should change 'action' to something like
'combinable_action' or something more explicit which we could easily
refer to later in a statement along the lines of:
Multiple combinable_actions specified in a single ALTER TABLE
statement will be applied together in a single pass over the table.
> (Of course, maybe the question we ought to be asking here is why
> ATTACH/DETACH PARTITION failed to go with the flow and be a
> combinable action.)
I did wonder that myself but havne't looked at the code. I'm guessing
there's a reason it's that way.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Anastasia Lubennikova | 2016-12-22 15:15:27 | Re: Vacuum: allow usage of more than 1GB of work mem |
Previous Message | Kuntal Ghosh | 2016-12-22 15:00:04 | An attempt to reduce WALWriteLock contention |