Re: Minor correction in alter_table.sgml

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, 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 14:49:04
Message-ID: 7854.1482418144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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."

(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.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-12-22 14:55:55 Re: Getting rid of "unknown error" in dblink and postgres_fdw
Previous Message Alvaro Herrera 2016-12-22 14:17:59 Re: Minor correction in alter_table.sgml