Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vxFCq-004qdS-25 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2026 02:09:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxFCo-003xTV-2Y for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2026 02:09:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vxFCo-003xTN-1H for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2026 02:09:50 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxFCm-000000006km-14vl for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2026 02:09:50 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-82418b0178cso2925308b3a.1 for ; Mon, 02 Mar 2026 18:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772503786; x=1773108586; darn=lists.postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=tadPQDyeKLmkIds/HoiE6mVd9oSs76CBTcC0i+Z55uc=; b=mP2EjBQycAKFxHiTfiaUKjrpEb+7gbJXAdBplDZyR+zn9FLiuGSVr3DWrgi8QZeJK6 aCv6NPWkym7JBRyv9EePTwCucpdFb6D4L1TCYyE32hRL6XS1VoTDs2GGK633OoAHCv4F jF5Gvnvn5ca1AiuQY1m0kvPgPcEpQdtmclzPY7j7q6C54aC3MwEzFfm6xW/OCOTxLssI A7X0sLwmW1XLeMiPABl18DdpHsny/xwrkQ1r+AB9mAGO47v7nd5LocNcfusB7B+M7uEg TbfPprclbf1CjF39+8++DyO3akjNoOIKz2IHGVvlQP/Wo24Lx7Mrqb3mkhmDuqLdRuXj HOhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772503786; x=1773108586; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tadPQDyeKLmkIds/HoiE6mVd9oSs76CBTcC0i+Z55uc=; b=U+wy5IZqoyomy+WY/4wIp5rEVdidyd8wryZ1TFEpXG+CkvxKQXUaZzS7v9nPNkNt0r rRp52TX12EKUcKX/kYu3Kf3Nvq30UcJAeK5zj1YjyxbMvveI8sgZn199076sapbIAWSa mLNrmRTD2CsOxa6i8GcJ0/gsRZ3LLykNgjpxiGZjYZjueT2af2m8QgYqqMMeoabtz1zs iyv2up/rtCyZEh0YOfOSDogqUfXhus8YRH8tC4/lcYLVZ4Kai9yZvjAFY3SQSX+UorO9 Oc9VGQkkIhSApYkpK5zOT5ZWbsFvtla5HLOSe6EbwK3ct4OAMWb74Z1s9R9II7KvlsE4 mvLw== X-Forwarded-Encrypted: i=1; AJvYcCUCbTVPQ9OfgLizcqoUGQw3fxDztTBpC1rIE/3cbGS7zBBB4Z7+SJgJH9cAPhxXirL0ijlhoqqbA/azBynN@lists.postgresql.org X-Gm-Message-State: AOJu0YxO5hYd604xQ/lV2AOLj6oV5PJ9zDZdvzWaimP2unOySvS0G+fK YZs7N0LUlqfTWr5BTozDZsEDqB4oXnc1ZPCnXynjMpF8NLp/mPu/IpZA X-Gm-Gg: ATEYQzxlozOSzDBEoXF0DYGpIrM9pCKUc8Te7IoxmE48zLtqYnX7uMMOdYbl1MJtf7G MzSzg4mJqBDWxF6APov+Q2TCKnf9nntWdJvuocRtvQm1ca9sg9UBF+Cd0wUWukvmk0cw7PGrZSB SxgZUlrJECwgefoXH+qB31Xx8o3ukA4tS7SLsYRvb4cP5rj8D7h4BUAPsS9gW+5L5R8lljflimf S4SXPjpcg+oIyWY7mysB7I5Cpr+ki6LxkazVH3s699KMC1+HT/NM692MZH9fwMllvlRhZRDv7YH ny2a5p9lpWGPrL0sFa2tH0rAEdSje8VHsu80PkvPafDYHugWzZmfmIPoScXBbZlMZ9ielwVFbcE pdJ7I54hSbQ9t/s+VYldAPpT+XXNp8FFm82kvS7cFeq4vQpmV6aCn9aWfCvR5E+UIXAYEo7yP4U 78bkKUNOA/omY4jWS+hELwTbgqPOb82HrrorqSo9s2IQ== X-Received: by 2002:a05:6a00:882:b0:824:9bad:94d1 with SMTP id d2e1a72fcca58-8274da086f5mr11508093b3a.51.1772503786249; Mon, 02 Mar 2026 18:09:46 -0800 (PST) Received: from smtpclient.apple ([203.76.245.26]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8273a053a16sm14588824b3a.54.2026.03.02.18.09.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2026 18:09:45 -0800 (PST) From: Chao Li Message-Id: <8F0F27C6-2267-4382-B4B7-C526B2950175@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_3FF768DF-04B8-44C6-9C07-4C0082D4B3A7" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: DOC: fixes multiple errors in alter table doc Date: Tue, 3 Mar 2026 10:09:11 +0800 In-Reply-To: <86974902-199B-413E-B4DA-9A484AB3A119@gmail.com> Cc: Robert Treat , Postgres hackers To: Fujii Masao References: <7D4CB5FF-6599-4157-A9E3-7B5E2CB96CEE@gmail.com> <86974902-199B-413E-B4DA-9A484AB3A119@gmail.com> X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_3FF768DF-04B8-44C6-9C07-4C0082D4B3A7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 2, 2026, at 17:22, Chao Li wrote: >=20 >=20 >=20 >> On Mar 2, 2026, at 17:04, Fujii Masao wrote: >>=20 >> On Thu, Jan 22, 2026 at 6:38=E2=80=AFPM Chao Li = wrote: >>> PFA v3: Rebased, and added reviewer and discussion information. >>=20 >> LGTM. >>=20 >> Should we apply the same change to the ALTER FOREIGN TABLE docs as = well? >=20 > Sure, I can make the change. >=20 >>=20 >> 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? >>=20 >=20 > I will verify that, then update the doc and regression test = accordingly. >=20 > Best regards, > -- > Chao Li (Evan) > HighGo Software Co., Ltd. > https://www.highgo.com/ >=20 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 Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_3FF768DF-04B8-44C6-9C07-4C0082D4B3A7 Content-Disposition: attachment; filename=v4-0001-doc-clarify-optional-COLUMN-in-ALTER-TABLE-ADD-DR.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v4-0001-doc-clarify-optional-COLUMN-in-ALTER-TABLE-ADD-DR.patch" Content-Transfer-Encoding: quoted-printable =46rom=205fa11495a4e7b10755a4017d8e1498435ae3e507=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Chao=20Li=20(Evan)"=20=0A= Date:=20Tue,=203=20Mar=202026=2009:50:54=20+0800=0ASubject:=20[PATCH=20= v4=201/2]=20doc:=20clarify=20optional=20COLUMN=20in=20ALTER=20TABLE=20= ADD/DROP=0A=0AAdjust=20the=20ALTER=20TABLE=20reference=20page=20to=20= reflect=20that=20the=20COLUMN=20keyword=0Ais=20optional=20for=20ADD=20= and=20DROP.=20The=20syntax=20was=20already=20accepted=20by=20the=0A= parser,=20but=20the=20documentation=20only=20showed=20the=20COLUMN=20= form.=0A=0AAdd=20regression=20tests=20covering:=0A-=20ALTER=20TABLE=20= ADD=20without=20COLUMN=0A-=20ALTER=20TABLE=20ADD=20IF=20NOT=20EXISTS=0A-=20= ALTER=20TABLE=20DROP=20without=20COLUMN=0A=0AAuthor:=20Chao=20Li=20= =0AReviewed-by:=20Fujii=20Masao=20= =0AReviewed-by:=20Robert=20Treat=20= =0ADiscussion:=20= https://postgr.es/m/CAEoWx2n6ShLMOnjOtf63TjjgGbgiTVT5OMsSOFmbjGb6Xue1Bw@ma= il.gmail.com=0A---=0A=20doc/src/sgml/ref/alter_table.sgml=20=20=20=20=20=20= =20=20=20|=20=204=20++--=0A=20src/test/regress/expected/alter_table.out=20= |=2010=20++++++++++=0A=20src/test/regress/sql/alter_table.sql=20=20=20=20= =20=20|=20=208=20++++++++=0A=203=20files=20changed,=2020=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/doc/src/sgml/ref/alter_table.sgml=20= b/doc/src/sgml/ref/alter_table.sgml=0Aindex=20aab2c6eb19f..00817e90360=20= 100644=0A---=20a/doc/src/sgml/ref/alter_table.sgml=0A+++=20= b/doc/src/sgml/ref/alter_table.sgml=0A@@=20-163,7=20+163,7=20@@=20WITH=20= (=20MODULUS=20numeric_literal,=20REM=0A=20=0A=20=20=20= =0A=20=20=20=20=0A-=20=20=20=20ADD=20= COLUMN=20[=20IF=20NOT=20EXISTS=20]=0A+=20=20=20=20= ADD=20[=20COLUMN=20]=20[=20IF=20NOT=20EXISTS=20= ]=0A=20=20=20=20=20=0A=20=20=20=20=20=20= =0A=20=20=20=20=20=20=20This=20form=20adds=20a=20new=20column=20to=20= the=20table,=20using=20the=20same=20syntax=20as=0A@@=20-175,7=20+175,7=20= @@=20WITH=20(=20MODULUS=20numeric_literal,=20REM=0A=20=20=20=20= =0A=20=0A=20=20=20=20=0A-=20=20=20=20= DROP=20COLUMN=20[=20IF=20EXISTS=20]=0A+=20= =20=20=20DROP=20[=20COLUMN=20]=20[=20IF=20EXISTS=20= ]=0A=20=20=20=20=20=0A=20=20=20=20=20=20= =0A=20=20=20=20=20=20=20This=20form=20drops=20a=20column=20from=20= a=20table.=20=20Indexes=20and=0Adiff=20--git=20= a/src/test/regress/expected/alter_table.out=20= b/src/test/regress/expected/alter_table.out=0Aindex=20= ac1a7345d0f..5998c670aa3=20100644=0A---=20= a/src/test/regress/expected/alter_table.out=0A+++=20= b/src/test/regress/expected/alter_table.out=0A@@=20-3849,6=20+3849,16=20= @@=20Referenced=20by:=0A=20ALTER=20TABLE=20test_add_column=0A=20=09ADD=20= COLUMN=20IF=20NOT=20EXISTS=20c5=20SERIAL=20CHECK=20(c5=20>=2010);=0A=20= NOTICE:=20=20column=20"c5"=20of=20relation=20"test_add_column"=20already=20= exists,=20skipping=0A+ALTER=20TABLE=20test_add_column=0A+=09ADD=20c6=20= integer;=20--=20omit=20COLUMN=0A+ALTER=20TABLE=20test_add_column=0A+=09= ADD=20IF=20NOT=20EXISTS=20c6=20integer;=0A+NOTICE:=20=20column=20"c6"=20= of=20relation=20"test_add_column"=20already=20exists,=20skipping=0A= +ALTER=20TABLE=20test_add_column=0A+=09DROP=20c6;=20--=20omit=20COLUMN=0A= +ALTER=20TABLE=20test_add_column=0A+=09DROP=20IF=20EXISTS=20c6;=0A= +NOTICE:=20=20column=20"c6"=20of=20relation=20"test_add_column"=20does=20= not=20exist,=20skipping=0A=20\d=20test_add_column*=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20Table=20= "public.test_add_column"=0A=20=20Column=20|=20=20Type=20=20=20|=20= Collation=20|=20Nullable=20|=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20Default=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=0Adiff=20--git=20a/src/test/regress/sql/alter_table.sql=20= b/src/test/regress/sql/alter_table.sql=0Aindex=20= 417202430a5..d6b6381ae5c=20100644=0A---=20= a/src/test/regress/sql/alter_table.sql=0A+++=20= b/src/test/regress/sql/alter_table.sql=0A@@=20-2331,6=20+2331,14=20@@=20= ALTER=20TABLE=20test_add_column=0A=20\d=20test_add_column=0A=20ALTER=20= TABLE=20test_add_column=0A=20=09ADD=20COLUMN=20IF=20NOT=20EXISTS=20c5=20= SERIAL=20CHECK=20(c5=20>=2010);=0A+ALTER=20TABLE=20test_add_column=0A+=09= ADD=20c6=20integer;=20--=20omit=20COLUMN=0A+ALTER=20TABLE=20= test_add_column=0A+=09ADD=20IF=20NOT=20EXISTS=20c6=20integer;=0A+ALTER=20= TABLE=20test_add_column=0A+=09DROP=20c6;=20--=20omit=20COLUMN=0A+ALTER=20= TABLE=20test_add_column=0A+=09DROP=20IF=20EXISTS=20c6;=0A=20\d=20= test_add_column*=0A=20DROP=20TABLE=20test_add_column;=0A=20\d=20= test_add_column*=0A--=20=0A2.50.1=20(Apple=20Git-155)=0A=0A= --Apple-Mail=_3FF768DF-04B8-44C6-9C07-4C0082D4B3A7 Content-Disposition: attachment; filename=v4-0002-doc-clarify-ALTER-FOREIGN-TABLE-ADD-DROP-COLUMN-s.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v4-0002-doc-clarify-ALTER-FOREIGN-TABLE-ADD-DROP-COLUMN-s.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d828ab6dfb764230098a7afaa349260b13125e4e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Chao=20Li=20(Evan)"=20=0A= Date:=20Tue,=203=20Mar=202026=2009:51:41=20+0800=0ASubject:=20[PATCH=20= v4=202/2]=20doc:=20clarify=20ALTER=20FOREIGN=20TABLE=20ADD/DROP=20COLUMN=0A= =20syntax=0A=0AUpdate=20the=20ALTER=20FOREIGN=20TABLE=20reference=20page=20= to=20reflect=20that:=0A=0A-=20COLUMN=20is=20optional=20for=20ADD=20and=20= DROP.=0A-=20IF=20NOT=20EXISTS=20is=20supported=20for=20ADD.=0A=0AThe=20= syntax=20has=20long=20allowed=20these=20forms,=20but=20the=20= documentation=20did=20not=0Afully=20reflect=20them.=0A=0AAdd=20= regression=20tests=20for=20ALTER=20FOREIGN=20TABLE=20covering:=0A-=20ADD=20= without=20COLUMN.=0A-=20ADD=20IF=20NOT=20EXISTS=20behavior.=0A-=20DROP=20= without=20COLUMN.=0A-=20DROP=20IF=20EXISTS=20behavior.=0A=0A= Suggested-by:=20Fujii=20Masao=20=0AAuthor:=20Chao=20= Li=20=0AReviewed-by:=20Fujii=20Masao=20= =0ADiscussion:=20= https://postgr.es/m/CAEoWx2n6ShLMOnjOtf63TjjgGbgiTVT5OMsSOFmbjGb6Xue1Bw@ma= il.gmail.com=0A---=0A=20doc/src/sgml/ref/alter_foreign_table.sgml=20=20|=20= 8=20+++++---=0A=20src/test/regress/expected/foreign_data.out=20|=208=20= ++++++++=0A=20src/test/regress/sql/foreign_data.sql=20=20=20=20=20=20|=20= 5=20+++++=0A=203=20files=20changed,=2018=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20= a/doc/src/sgml/ref/alter_foreign_table.sgml=20= b/doc/src/sgml/ref/alter_foreign_table.sgml=0Aindex=20= e6d99e99016..228067f087c=20100644=0A---=20= a/doc/src/sgml/ref/alter_foreign_table.sgml=0A+++=20= b/doc/src/sgml/ref/alter_foreign_table.sgml=0A@@=20-32,7=20+32,7=20@@=20= ALTER=20FOREIGN=20TABLE=20[=20IF=20EXISTS=20]=20namewhere=20= action=20is=20one=20= of:=0A=20=0A-=20=20=20=20ADD=20[=20COLUMN=20]=20column_name=20data_type=20[=20COLLATE=20collation=20]=20[=20column_constraint=20[=20...=20]=20]=0A= +=20=20=20=20ADD=20[=20COLUMN=20]=20[=20IF=20NOT=20EXISTS=20]=20= column_name=20= data_type=20[=20COLLATE=20= collation=20]=20[=20= column_constraint=20[=20= ...=20]=20]=0A=20=20=20=20=20DROP=20[=20COLUMN=20]=20[=20IF=20EXISTS=20]=20= column_name=20[=20= RESTRICT=20|=20CASCADE=20]=0A=20=20=20=20=20ALTER=20[=20COLUMN=20]=20= column_name=20[=20SET=20= DATA=20]=20TYPE=20data_type=20[=20COLLATE=20collation=20]=0A=20=20=20=20=20ALTER=20= [=20COLUMN=20]=20column_name=20SET=20DEFAULT=20= expression=0A@@=20= -67,11=20+67,13=20@@=20ALTER=20FOREIGN=20TABLE=20[=20IF=20EXISTS=20]=20= name=0A=20=20=20=20=0A-=20=20=20=20= ADD=20COLUMN=0A+=20=20=20=20= ADD=20[=20COLUMN=20]=20[=20IF=20NOT=20EXISTS=20= ]=0A=20=20=20=20=20=0A=20=20=20=20=20=20= =0A=20=20=20=20=20=20=20This=20form=20adds=20a=20new=20column=20to=20= the=20foreign=20table,=20using=20the=20same=20syntax=20as=0A=20=20=20=20=20= =20=20CREATE=20= FOREIGN=20TABLE.=0A+=20=20=20=20=20=20If=20IF=20= NOT=20EXISTS=20is=20specified=20and=20a=20column=20already=0A+=20= =20=20=20=20=20exists=20with=20this=20name,=20no=20error=20is=20thrown.=0A= =20=20=20=20=20=20=20Unlike=20the=20case=20when=20adding=20a=20column=20= to=20a=20regular=20table,=20nothing=20happens=0A=20=20=20=20=20=20=20to=20= the=20underlying=20storage:=20this=20action=20simply=20declares=20that=0A= =20=20=20=20=20=20=20some=20new=20column=20is=20now=20accessible=20= through=20the=20foreign=20table.=0A@@=20-80,7=20+82,7=20@@=20ALTER=20= FOREIGN=20TABLE=20[=20IF=20EXISTS=20]=20name=0A=20=0A= =20=20=20=20= =0A-=20=20=20=20DROP=20COLUMN=20[=20IF=20EXISTS=20= ]=0A+=20=20=20=20DROP=20[=20COLUMN=20]=20= [=20IF=20EXISTS=20]=0A=20=20=20=20=20=0A=20=20= =20=20=20=20=0A=20=20=20=20=20=20=20This=20form=20drops=20a=20= column=20from=20a=20foreign=20table.=0Adiff=20--git=20= a/src/test/regress/expected/foreign_data.out=20= b/src/test/regress/expected/foreign_data.out=0Aindex=20= cce49e509ab..8bbf6a2d3dd=20100644=0A---=20= a/src/test/regress/expected/foreign_data.out=0A+++=20= b/src/test/regress/expected/foreign_data.out=0A@@=20-827,11=20+827,15=20= @@=20COMMENT=20ON=20COLUMN=20ft1.c1=20IS=20'foreign=20column';=0A=20= COMMENT=20ON=20COLUMN=20ft1.c1=20IS=20NULL;=0A=20ALTER=20FOREIGN=20TABLE=20= ft1=20ADD=20COLUMN=20c4=20integer;=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20= ADD=20COLUMN=20c5=20integer=20DEFAULT=200;=0A+ALTER=20FOREIGN=20TABLE=20= ft1=20ADD=20COLUMN=20IF=20NOT=20EXISTS=20c5=20integer;=0A+NOTICE:=20=20= column=20"c5"=20of=20relation=20"ft1"=20already=20exists,=20skipping=0A=20= ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c6=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c7=20integer=20NOT=20NULL;=0A=20= ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c8=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c9=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c10=20integer=20OPTIONS=20(p1=20= 'v1');=0A+ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20c12=20integer;=20--=20= omit=20COLUMN=0A+ALTER=20FOREIGN=20TABLE=20ft1=20DROP=20c12;=20--=20omit=20= COLUMN=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20ALTER=20COLUMN=20c4=20SET=20= DEFAULT=200;=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20ALTER=20COLUMN=20c5=20= DROP=20DEFAULT;=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20ALTER=20COLUMN=20c6=20= SET=20NOT=20NULL;=0A@@=20-929,6=20+933,8=20@@=20FDW=20options:=20(quote=20= '~',=20"be=20quoted"=20'value',=20escape=20'@')=0A=20--=20alter=20= noexisting=20table=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20= doesnt_exist_ft1=20ADD=20COLUMN=20c4=20integer;=0A=20NOTICE:=20=20= relation=20"doesnt_exist_ft1"=20does=20not=20exist,=20skipping=0A+ALTER=20= FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20ADD=20c4=20integer;=0A= +NOTICE:=20=20relation=20"doesnt_exist_ft1"=20does=20not=20exist,=20= skipping=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20= ADD=20COLUMN=20c6=20integer;=0A=20NOTICE:=20=20relation=20= "doesnt_exist_ft1"=20does=20not=20exist,=20skipping=0A=20ALTER=20FOREIGN=20= TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20ADD=20COLUMN=20c7=20integer=20= NOT=20NULL;=0A@@=20-962,6=20+968,8=20@@=20ALTER=20FOREIGN=20TABLE=20IF=20= EXISTS=20doesnt_exist_ft1=20OPTIONS=20(DROP=20delimiter,=20SET=20quot=0A=20= NOTICE:=20=20relation=20"doesnt_exist_ft1"=20does=20not=20exist,=20= skipping=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20= DROP=20COLUMN=20IF=20EXISTS=20no_column;=0A=20NOTICE:=20=20relation=20= "doesnt_exist_ft1"=20does=20not=20exist,=20skipping=0A+ALTER=20FOREIGN=20= TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20DROP=20IF=20EXISTS=20no_column;=0A= +NOTICE:=20=20relation=20"doesnt_exist_ft1"=20does=20not=20exist,=20= skipping=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20= DROP=20COLUMN=20c9;=0A=20NOTICE:=20=20relation=20"doesnt_exist_ft1"=20= does=20not=20exist,=20skipping=0A=20ALTER=20FOREIGN=20TABLE=20IF=20= EXISTS=20doesnt_exist_ft1=20SET=20SCHEMA=20foreign_schema;=0Adiff=20= --git=20a/src/test/regress/sql/foreign_data.sql=20= b/src/test/regress/sql/foreign_data.sql=0Aindex=20= aa147b14a90..00e71b73376=20100644=0A---=20= a/src/test/regress/sql/foreign_data.sql=0A+++=20= b/src/test/regress/sql/foreign_data.sql=0A@@=20-382,11=20+382,14=20@@=20= COMMENT=20ON=20COLUMN=20ft1.c1=20IS=20NULL;=0A=20=0A=20ALTER=20FOREIGN=20= TABLE=20ft1=20ADD=20COLUMN=20c4=20integer;=0A=20ALTER=20FOREIGN=20TABLE=20= ft1=20ADD=20COLUMN=20c5=20integer=20DEFAULT=200;=0A+ALTER=20FOREIGN=20= TABLE=20ft1=20ADD=20COLUMN=20IF=20NOT=20EXISTS=20c5=20integer;=0A=20= ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c6=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c7=20integer=20NOT=20NULL;=0A=20= ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c8=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c9=20integer;=0A=20ALTER=20= FOREIGN=20TABLE=20ft1=20ADD=20COLUMN=20c10=20integer=20OPTIONS=20(p1=20= 'v1');=0A+ALTER=20FOREIGN=20TABLE=20ft1=20ADD=20c12=20integer;=20--=20= omit=20COLUMN=0A+ALTER=20FOREIGN=20TABLE=20ft1=20DROP=20c12;=20--=20omit=20= COLUMN=0A=20=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20ALTER=20COLUMN=20c4=20= SET=20DEFAULT=200;=0A=20ALTER=20FOREIGN=20TABLE=20ft1=20ALTER=20COLUMN=20= c5=20DROP=20DEFAULT;=0A@@=20-429,6=20+432,7=20@@=20ALTER=20FOREIGN=20= TABLE=20foreign_schema.ft1=20RENAME=20TO=20foreign_table_1;=0A=20=0A=20= --=20alter=20noexisting=20table=0A=20ALTER=20FOREIGN=20TABLE=20IF=20= EXISTS=20doesnt_exist_ft1=20ADD=20COLUMN=20c4=20integer;=0A+ALTER=20= FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20ADD=20c4=20integer;=0A= =20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20ADD=20= COLUMN=20c6=20integer;=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20= doesnt_exist_ft1=20ADD=20COLUMN=20c7=20integer=20NOT=20NULL;=0A=20ALTER=20= FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20ADD=20COLUMN=20c8=20= integer;=0A@@=20-448,6=20+452,7=20@@=20ALTER=20FOREIGN=20TABLE=20IF=20= EXISTS=20doesnt_exist_ft1=20DROP=20CONSTRAINT=20ft1_c1_check;=0A=20ALTER=20= FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20OWNER=20TO=20= regress_test_role;=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20= doesnt_exist_ft1=20OPTIONS=20(DROP=20delimiter,=20SET=20quote=20'~',=20= ADD=20escape=20'@');=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20= doesnt_exist_ft1=20DROP=20COLUMN=20IF=20EXISTS=20no_column;=0A+ALTER=20= FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20DROP=20IF=20EXISTS=20= no_column;=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20= DROP=20COLUMN=20c9;=0A=20ALTER=20FOREIGN=20TABLE=20IF=20EXISTS=20= doesnt_exist_ft1=20SET=20SCHEMA=20foreign_schema;=0A=20ALTER=20FOREIGN=20= TABLE=20IF=20EXISTS=20doesnt_exist_ft1=20RENAME=20c1=20TO=20= foreign_column_1;=0A--=20=0A2.50.1=20(Apple=20Git-155)=0A=0A= --Apple-Mail=_3FF768DF-04B8-44C6-9C07-4C0082D4B3A7--