pg_collation

A system catalogue table describing the available collations

pg_collation is a system catalogue table describing the available collations.

psql

\dO lists the available collations.

Definition by PostgreSQL version

pg_collation (PostgreSQL 13)

                Table "pg_catalog.pg_collation"
       Column        |  Type   | Collation | Nullable | Default
---------------------+---------+-----------+----------+---------
 oid                 | oid     |           | not null |
 collname            | name    |           | not null |
 collnamespace       | oid     |           | not null |
 collowner           | oid     |           | not null |
 collprovider        | "char"  |           | not null |
 collisdeterministic | boolean |           | not null |
 collencoding        | integer |           | not null |
 collcollate         | name    |           | not null |
 collctype           | name    |           | not null |
 collversion         | text    | C         |          |
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 12)

                Table "pg_catalog.pg_collation"
       Column        |  Type   | Collation | Nullable | Default
---------------------+---------+-----------+----------+---------
 oid                 | oid     |           | not null |
 collname            | name    |           | not null |
 collnamespace       | oid     |           | not null |
 collowner           | oid     |           | not null |
 collprovider        | "char"  |           | not null |
 collisdeterministic | boolean |           | not null |
 collencoding        | integer |           | not null |
 collcollate         | name    |           | not null |
 collctype           | name    |           | not null |
 collversion         | text    | C         |          |
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 11)

             Table "pg_catalog.pg_collation"
    Column     |  Type   | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
 collname      | name    |           | not null |
 collnamespace | oid     |           | not null |
 collowner     | oid     |           | not null |
 collprovider  | "char"  |           | not null |
 collencoding  | integer |           | not null |
 collcollate   | name    |           | not null |
 collctype     | name    |           | not null |
 collversion   | text    |           |          |
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 10)

             Table "pg_catalog.pg_collation"
    Column     |  Type   | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
 collname      | name    |           | not null |
 collnamespace | oid     |           | not null |
 collowner     | oid     |           | not null |
 collprovider  | "char"  |           | not null |
 collencoding  | integer |           | not null |
 collcollate   | name    |           | not null |
 collctype     | name    |           | not null |
 collversion   | text    |           |          |
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.6)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.5)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.4)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.3)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.2)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

pg_collation (PostgreSQL 9.1)

   Table "pg_catalog.pg_collation"
    Column     |  Type   | Modifiers
---------------+---------+-----------
 collname      | name    | not null
 collnamespace | oid     | not null
 collowner     | oid     | not null
 collencoding  | integer | not null
 collcollate   | name    | not null
 collctype     | name    | not null
Indexes:
    "pg_collation_name_enc_nsp_index" UNIQUE, btree (collname, collencoding, collnamespace)
    "pg_collation_oid_index" UNIQUE, btree (oid)
    

Documentation: pg_collation

Change history

Examples

postgres=# SELECT * FROM pg_collation WHERE collname='en_GB.utf8'\x\g\x
Expanded display is on.
-[ RECORD 1 ]-------+-----------
oid                 | 12529
collname            | en_GB.utf8
collnamespace       | 11
collowner           | 10
collprovider        | c
collisdeterministic | t
collencoding        | 6
collcollate         | en_GB.utf8
collctype           | en_GB.utf8
collversion         | 

Categories

System catalogue