| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Robert Treat <rob(at)xzilla(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: DOC: fixes multiple errors in alter table doc |
| Date: | 2026-03-03 08:04:53 |
| Message-ID: | 6C5477E4-6F3B-48F5-B58E-EDB84A7BB8AB@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Mar 3, 2026, at 12:41, Robert Treat <rob(at)xzilla(dot)net> wrote:
>
> On Mon, Mar 2, 2026 at 9:09 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>> On Mar 2, 2026, at 17:22, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>>> On Mar 2, 2026, at 17:04, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>> On Thu, Jan 22, 2026 at 6:38 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>>>> PFA v3: Rebased, and added reviewer and discussion information.
>>>>
>>>> LGTM.
>>>>
>>>> Should we apply the same change to the ALTER FOREIGN TABLE docs as well?
>>>
>>> Sure, I can make the change.
>>>
>>>>
>>>> While reviewing that section, I noticed that ADD COLUMN IF NOT EXISTS appears
>>>> to work for ALTER FOREIGN TABLE, but it isn't documented. I'm not sure why
>>>> it was left out, but perhaps we should document it and add a regression test in
>>>> a separate patch?
>>>>
>>>
>>> I will verify that, then update the doc and regression test accordingly.
>>>
>>> Best regards,
>>> --
>>> Chao Li (Evan)
>>> HighGo Software Co., Ltd.
>>> https://www.highgo.com/
>>>
>>
>> PFA v4:
>>
>> 0001 - alter table related changes
>>
>> * Add test cases for omitting COLUMN of ALTER TABLE ADD/DROP [COLUMN]
>> * Add a test case for ADD COLUMN IF NOT EXIST (already had DROP COLUMN IF EXIST)
>>
>> 0002 - alter foreign table related changes
>>
>> * doc: Add IF NOT EXSTS for ADD COLUMN
>> * doc: Mark COLUMN as optional for ADD/DROP COLUMN in the same way as 0001
>> * Add test cases for omitting COLUMN of ALTER FOREIGN TABLE ADD/DROP [COLUMN]
>> * Add a test cases for for ADD COLUMN IF NOT EXIST
>> * Add a test cases for for DROP COLUMN IF EXIST
>>
>
> LGTM,
Thanks for confirming.
> although I was curious why you went with c12 vs c11 in
> +ALTER FOREIGN TABLE ft1 ADD c12 integer; -- omit COLUMN
> or maybe that should be changed?
>
Your eagle eyes! I originally added both c11 and c12 test cases. After some tuning, I removed the c11 case, but forgot to rename c12 to c11 accordingly. Thanks for catching that.
PFA v5:
* In 0002, renamed c12 to c11 in the ALTER FOREIGN TABLE tests.
* In 0002, added one more test case: ALTER FOREIGN TABLE ft1 DROP IF EXISTS no_column;
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-doc-clarify-optional-COLUMN-in-ALTER-TABLE-ADD-DR.patch | application/octet-stream | 3.6 KB |
| v5-0002-doc-clarify-ALTER-FOREIGN-TABLE-ADD-DROP-COLUMN-s.patch | application/octet-stream | 9.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hayato Kuroda (Fujitsu) | 2026-03-03 08:14:28 | RE: BUG: Former primary node might stuck when started as a standby |
| Previous Message | jian he | 2026-03-03 08:03:46 | Re: NOT NULL NOT ENFORCED |