From 7f0b7768352cc7031f5b482b2c9e1526d036ffe2 Mon Sep 17 00:00:00 2001 From: amit Date: Wed, 12 Apr 2017 15:16:56 +0900 Subject: [PATCH 2/5] 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 e9b5c8a448..5016c2de74 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -15271,7 +15271,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) if ((tbinfo->reloftype || tbinfo->partitionOf) && !dopt->binary_upgrade) { - appendPQExpBufferStr(q, " WITH OPTIONS"); + if (tbinfo->reloftype) + appendPQExpBufferStr(q, " WITH OPTIONS"); } else { -- 2.11.0