1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Implement type regcollation

This will be helpful for a following commit and it's also just
generally useful, like the other reg* types.

Author: Julien Rouhaud
Reviewed-by: Thomas Munro and Michael Paquier
Discussion: https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com
This commit is contained in:
Peter Eisentraut
2020-03-18 21:20:01 +01:00
parent c31132d87c
commit a2b1faa0f2
11 changed files with 256 additions and 3 deletions

View File

@ -4476,6 +4476,10 @@ INSERT INTO mytable VALUES(-1); -- fails
<primary>regclass</primary>
</indexterm>
<indexterm zone="datatype-oid">
<primary>regcollation</primary>
</indexterm>
<indexterm zone="datatype-oid">
<primary>regconfig</primary>
</indexterm>
@ -4602,6 +4606,12 @@ SELECT * FROM pg_attribute
<entry><literal>pg_type</literal></entry>
</row>
<row>
<entry><type>regcollation</type></entry>
<entry><structname>pg_collation</structname></entry>
<entry>collation name</entry>
<entry><literal>"POSIX"</literal></entry>
</row>
<row>
<entry><type>regconfig</type></entry>

View File

@ -18177,6 +18177,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<primary>to_regclass</primary>
</indexterm>
<indexterm>
<primary>to_regcollation</primary>
</indexterm>
<indexterm>
<primary>to_regnamespace</primary>
</indexterm>
@ -18389,6 +18393,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<entry><type>regclass</type></entry>
<entry>get the OID of the named relation</entry>
</row>
<row>
<entry><literal><function>to_regcollation(<parameter>coll_name</parameter>)</function></literal></entry>
<entry><type>regcollation</type></entry>
<entry>get the OID of the named collation</entry>
</row>
<row>
<entry><literal><function>to_regnamespace(<parameter>schema_name</parameter>)</function></literal></entry>
<entry><type>regnamespace</type></entry>
@ -18720,11 +18729,11 @@ SELECT collation for ('foo' COLLATE "de_DE");
</para>
<para>
The functions <function>to_regclass</function>,
The functions <function>to_regclass</function>, <function>to_regcollation</function>,
<function>to_regnamespace</function>, <function>to_regoper</function>,
<function>to_regoperator</function>, <function>to_regrole</function>,
<function>to_regproc</function>, <function>to_regprocedure</function>, and
<function>to_regtype</function>, functions translate relation, schema,
<function>to_regtype</function>, functions translate relation, collation, schema,
operator, role, function, and type names (given as <type>text</type>) to
objects of the corresponding <type>reg*</type> type (see <xref
linkend="datatype-oid"/> about the types). These functions differ from a

View File

@ -774,6 +774,7 @@ psql --username=postgres --file=script.sql postgres
<application>pg_upgrade</application> does not support upgrading of databases
containing table columns using these <type>reg*</type> OID-referencing system data types:
<simplelist>
<member><type>regcollation</type></member>
<member><type>regconfig</type></member>
<member><type>regdictionary</type></member>
<member><type>regnamespace</type></member>