<title><structname>pg_collation</structname></title>
<indexterm zone="catalog-pg-collation">
<primary>pg_collation</primary>
</indexterm>
<para>
The catalog <structname>pg_collation</structname> describes the
available collations, which are essentially mappings from an SQL
name to operating system locale categories.
See <xref linkend="collation"/> for more information.
</para>
<table>
<title><structname>pg_collation</structname> Columns</title>
<tgroup cols="1">
<thead>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
Column Type
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>oid</structfield> <type>oid</type>
</para>
<para>
Row identifier
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collname</structfield> <type>name</type>
</para>
<para>
Collation name (unique per namespace and encoding)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collnamespace</structfield> <type>oid</type>
(references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The OID of the namespace that contains this collation
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collowner</structfield> <type>oid</type>
(references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
</para>
<para>
Owner of the collation
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collprovider</structfield> <type>char</type>
</para>
<para>
Provider of the collation: <literal>d</literal> = database default,
<literal>b</literal> = builtin, <literal>c</literal> = libc,
<literal>i</literal> = icu </para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collisdeterministic</structfield> <type>bool</type>
</para>
<para>
Is the collation deterministic?
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collencoding</structfield> <type>int4</type>
</para>
<para>
Encoding in which the collation is applicable, or -1 if it
works for any encoding
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collcollate</structfield> <type>text</type>
</para>
<para>
<symbol>LC_COLLATE</symbol> for this collation object. If the provider is
not <literal>libc</literal>, <structfield>collcollate</structfield> is
<literal>NULL</literal> and <structfield>colllocale</structfield> is
used instead.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>collctype</structfield> <type>text</type>
</para>
<para>
<symbol>LC_CTYPE</symbol> for this collation object. If the provider is
not <literal>libc</literal>, <structfield>collctype</structfield> is
<literal>NULL</literal> and <structfield>colllocale</structfield> is
used instead.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>colllocale</structfield> <type>text</type>
</para>