From 3782acebb0d3d8898d49734813d4474f72276bf9 Mon Sep 17 00:00:00 2001 From: amit 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 b840a479e0..5ec8d9f3cf 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