Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 354547b

Browse files
committed
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 ...
1 parent 24ac52c commit 354547b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.573 2010/02/24 01:57:16 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.574 2010/02/24 02:15:58 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -10685,6 +10685,14 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
1068510685

1068610686
if (actual_atts)
1068710687
appendPQExpBuffer(q, "\n)");
10688+
else if (!tbinfo->reloftype)
10689+
{
10690+
/*
10691+
* We must have a parenthesized attribute list, even though empty,
10692+
* when not using the OF TYPE syntax.
10693+
*/
10694+
appendPQExpBuffer(q, " (\n)");
10695+
}
1068810696

1068910697
if (numParents > 0 && !binary_upgrade)
1069010698
{

0 commit comments

Comments
 (0)