aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-07-27 03:47:22 +0000
committerBruce Momjian <bruce@momjian.us>2003-07-27 03:47:22 +0000
commit9ae690552034e1441c46b404eb5889b0110bd19e (patch)
tree06930ee759a6d2810221d4a8b645a38ee0d0d93a /src
parent9df48371c20869ac63a63b45550dbf4b045aa4bf (diff)
downloadpostgresql-9ae690552034e1441c46b404eb5889b0110bd19e.tar.gz
postgresql-9ae690552034e1441c46b404eb5889b0110bd19e.zip
This is a totally trivial patch for something that was a very minor nit that
annoyed me the other day while I was documenting my current project. It makes pg_dump use the same layout for types as for tables, by putting "\n\t" before the first field and "\n" before the final ");" Can't really justify this too much except to say I had an itch and I scratched it ;-) Andrew Dunstan
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 66b10c2aa77..0c38d4a8ef3 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.338 2003/07/25 21:02:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.339 2003/07/27 03:47:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3432,12 +3432,12 @@ dumpOneCompositeType(Archive *fout, TypeInfo *tinfo)
attname = PQgetvalue(res, i, i_attname);
atttypdefn = PQgetvalue(res, i, i_atttypdefn);
- if (i > 0)
- appendPQExpBuffer(q, ",\n\t");
- appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn);
+ appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), atttypdefn);
+ if (i < ntups - 1)
+ appendPQExpBuffer(q, ",");
}
- appendPQExpBuffer(q, ");\n");
-
+ appendPQExpBuffer(q, "\n);\n");
+
/*
* DROP must be fully qualified in case same name appears in
* pg_catalog