From c7ea303bf4453d1577699ca4349958be9c470436 Mon Sep 17 00:00:00 2001
From: amit <amitlangote09@gmail.com>
Date: Wed, 12 Apr 2017 15:16:56 +0900
Subject: [PATCH 3/3] Do not emit WITH OPTIONS for partition's columns

CREATE TABLE OF requires it, but CREATE TABLE PARTITION OF doesn't.
---
 src/bin/pg_dump/pg_dump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 7560e528d2..5e4af291f8 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15227,7 +15227,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
 					if ((tbinfo->reloftype || tbinfo->ispartition) &&
 						!dopt->binary_upgrade)
 					{
-						appendPQExpBufferStr(q, " WITH OPTIONS");
+						if (tbinfo->reloftype)
+							appendPQExpBufferStr(q, " WITH OPTIONS");
 					}
 					else
 					{
-- 
2.11.0

