Skip to content

Commit 9ae6905

Browse files
committed
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
1 parent 9df4837 commit 9ae6905

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.338 2003/07/25 21:02:52 tgl Exp $
15+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.339 2003/07/27 03:47:22 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -3432,12 +3432,12 @@ dumpOneCompositeType(Archive *fout, TypeInfo *tinfo)
34323432
attname = PQgetvalue(res, i, i_attname);
34333433
atttypdefn = PQgetvalue(res, i, i_atttypdefn);
34343434

3435-
if (i > 0)
3436-
appendPQExpBuffer(q, ",\n\t");
3437-
appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn);
3435+
appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), atttypdefn);
3436+
if (i < ntups - 1)
3437+
appendPQExpBuffer(q, ",");
34383438
}
3439-
appendPQExpBuffer(q, ");\n");
3440-
3439+
appendPQExpBuffer(q, "\n);\n");
3440+
34413441
/*
34423442
* DROP must be fully qualified in case same name appears in
34433443
* pg_catalog

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy