diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-24 02:15:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-24 02:15:58 +0000 |
commit | 354547b0155ca9c2918d24b9dbf48eb04862ee38 (patch) | |
tree | e71ff60a7342f169cad8a35f48fdacf3ca227d9b /src | |
parent | 24ac52c3f1f7f408820dc9eff001e2c6bc0941a1 (diff) | |
download | postgresql-354547b0155ca9c2918d24b9dbf48eb04862ee38.tar.gz postgresql-354547b0155ca9c2918d24b9dbf48eb04862ee38.zip |
Un-break pg_dump for the case of zero-column tables.
This was evidently broken by the CREATE TABLE OF TYPE patch. It would have
been noticed if anyone had bothered to try dumping and restoring the
regression database ...
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index cf38f167fbe..95c08f11f97 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.573 2010/02/24 01:57:16 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.574 2010/02/24 02:15:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -10685,6 +10685,14 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) if (actual_atts) appendPQExpBuffer(q, "\n)"); + else if (!tbinfo->reloftype) + { + /* + * We must have a parenthesized attribute list, even though empty, + * when not using the OF TYPE syntax. + */ + appendPQExpBuffer(q, " (\n)"); + } if (numParents > 0 && !binary_upgrade) { |