Re: pgsql: DDL support for collations - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: DDL support for collations
Date
Msg-id 4108.1297529686@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: DDL support for collations  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-committers
Peter Eisentraut <peter_e@gmx.net> writes:
> DDL support for collations

When you are adding a new DumpableObject type to pg_dump, please do NOT
do this:

@@ -95,7 +96,8 @@ static const int newObjectTypePriority[] =
    16,                         /* DO_FOREIGN_SERVER */
    28,                         /* DO_DEFAULT_ACL */
    20,                         /* DO_BLOB */
-   22                          /* DO_BLOB_DATA */
+   22,                         /* DO_BLOB_DATA */
+   3                           /* DO_COLLATION */
 };

That is, do not just give the new object type the same sort priority as
some randomly-chosen existing type.  The effect of what you've done is
that collations and extensions will be intermixed in the dump output,
which is ugly.  Give collations their own place in the sort order and
renumber the existing entries as necessary to support that.

            regards, tom lane

pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso