dump order of sequence options - Mailing list pgsql-hackers

From Peter Eisentraut
Subject dump order of sequence options
Date
Msg-id 1261257322.3347.5.camel@vanquo.pezone.net
Whole thread Raw
List pgsql-hackers
A very minor point, but I found when reading dumps it makes more sense
that in the CREATE SEQUENCE command MINVALUE comes before MAXVALUE.
Objections to this patch?
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 9748379..8776e27 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -11254,16 +11254,16 @@ dumpSequence(Archive *fout, TableInfo *tbinfo)

         appendPQExpBuffer(query, "    INCREMENT BY %s\n", incby);

-        if (maxv)
-            appendPQExpBuffer(query, "    MAXVALUE %s\n", maxv);
-        else
-            appendPQExpBuffer(query, "    NO MAXVALUE\n");
-
         if (minv)
             appendPQExpBuffer(query, "    MINVALUE %s\n", minv);
         else
             appendPQExpBuffer(query, "    NO MINVALUE\n");

+        if (maxv)
+            appendPQExpBuffer(query, "    MAXVALUE %s\n", maxv);
+        else
+            appendPQExpBuffer(query, "    NO MAXVALUE\n");
+
         appendPQExpBuffer(query,
                           "    CACHE %s%s",
                           cache, (cycled ? "\n    CYCLE" : ""));

pgsql-hackers by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: Time to run initdb is mostly figure-out-the-timezone work
Next
From: Tom Lane
Date:
Subject: Re: creating index names automatically?