mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Revert addition of third argument to format_type().
Including collation in the behavior of that function promotes a world view we do not want. Moreover, it was producing the wrong behavior for pg_dump anyway: what we want is to dump a COLLATE clause on attributes whose attcollation is different from the underlying type, and likewise for domains, and the function cannot do that for us. Doing it the hard way in pg_dump is a bit more tedious but produces more correct output. In passing, fix initdb so that the initial entry in pg_collation is properly pinned. It was droppable before :-(
This commit is contained in:
@ -13269,7 +13269,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal><function>format_type(<parameter>type_oid</parameter> [, <parameter>typemod</> [, <parameter>collation_oid</> ]])</function></literal></entry>
|
||||
<entry><literal><function>format_type(<parameter>type_oid</parameter>, <parameter>typemod</>)</function></literal></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>get SQL name of a data type</entry>
|
||||
</row>
|
||||
@ -13410,9 +13410,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
<para>
|
||||
<function>format_type</function> returns the SQL name of a data type that
|
||||
is identified by its type OID and possibly a type modifier. Pass NULL
|
||||
for the type modifier or omit the argument if no specific modifier is known.
|
||||
If a collation is given as third argument, a <literal>COLLATE</> clause
|
||||
followed by a formatted collation name is appended.
|
||||
for the type modifier if no specific modifier is known.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user