| Server IP : 104.21.25.180 / Your IP : 162.159.115.42 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/postgresql-docs/html/ |
Upload File : |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>36.7. character_sets</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="[email protected]" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="infoschema-attributes.html" title="36.6. attributes" /><link rel="next" href="infoschema-check-constraint-routine-usage.html" title="36.8. check_constraint_routine_usage" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">36.7. <code xmlns="http://www.w3.org/1999/xhtml" class="literal">character_sets</code></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="infoschema-attributes.html" title="36.6. attributes">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="information-schema.html" title="Chapter 36. The Information Schema">Up</a></td><th width="60%" align="center">Chapter 36. The Information Schema</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="infoschema-check-constraint-routine-usage.html" title="36.8. check_constraint_routine_usage">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="INFOSCHEMA-CHARACTER-SETS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">36.7. <code class="literal">character_sets</code></h2></div></div></div><p> The view <code class="literal">character_sets</code> identifies the character
sets available in the current database. Since PostgreSQL does not
support multiple character sets within one database, this view only
shows one, which is the database encoding.
</p><p> Take note of how the following terms are used in the SQL standard:
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">character repertoire</span></dt><dd><p> An abstract collection of characters, for
example <code class="literal">UNICODE</code>, <code class="literal">UCS</code>, or
<code class="literal">LATIN1</code>. Not exposed as an SQL object, but
visible in this view.
</p></dd><dt><span class="term">character encoding form</span></dt><dd><p> An encoding of some character repertoire. Most older character
repertoires only use one encoding form, and so there are no
separate names for them (e.g., <code class="literal">LATIN1</code> is an
encoding form applicable to the <code class="literal">LATIN1</code>
repertoire). But for example Unicode has the encoding forms
<code class="literal">UTF8</code>, <code class="literal">UTF16</code>, etc. (not
all supported by PostgreSQL). Encoding forms are not exposed
as an SQL object, but are visible in this view.
</p></dd><dt><span class="term">character set</span></dt><dd><p> A named SQL object that identifies a character repertoire, a
character encoding, and a default collation. A predefined
character set would typically have the same name as an encoding
form, but users could define other names. For example, the
character set <code class="literal">UTF8</code> would typically identify
the character repertoire <code class="literal">UCS</code>, encoding
form <code class="literal">UTF8</code>, and some default collation.
</p></dd></dl></div><p>
You can think of an <span class="quote">“<span class="quote">encoding</span>”</span> in PostgreSQL either as
a character set or a character encoding form. They will have the
same name, and there can only be one in one database.
</p><div class="table" id="id-1.7.6.11.4"><p class="title"><strong>Table 36.5. <code class="literal">character_sets</code> Columns</strong></p><div class="table-contents"><table class="table" summary="character_sets Columns" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">character_set_catalog</code></td><td><code class="literal">sql_identifier</code></td><td>Character sets are currently not implemented as schema objects, so this column is null.</td></tr><tr><td><code class="literal">character_set_schema</code></td><td><code class="literal">sql_identifier</code></td><td>Character sets are currently not implemented as schema objects, so this column is null.</td></tr><tr><td><code class="literal">character_set_name</code></td><td><code class="literal">sql_identifier</code></td><td>Name of the character set, currently implemented as showing the name of the database encoding</td></tr><tr><td><code class="literal">character_repertoire</code></td><td><code class="literal">sql_identifier</code></td><td>Character repertoire, showing <code class="literal">UCS</code> if the encoding is <code class="literal">UTF8</code>, else just the encoding name</td></tr><tr><td><code class="literal">form_of_use</code></td><td><code class="literal">sql_identifier</code></td><td>Character encoding form, same as the database encoding</td></tr><tr><td><code class="literal">default_collate_catalog</code></td><td><code class="literal">sql_identifier</code></td><td>Name of the database containing the default collation (always the current database, if any collation is identified)</td></tr><tr><td><code class="literal">default_collate_schema</code></td><td><code class="literal">sql_identifier</code></td><td>Name of the schema containing the default collation</td></tr><tr><td><code class="literal">default_collate_name</code></td><td><code class="literal">sql_identifier</code></td><td> Name of the default collation. The default collation is
identified as the collation that matches
the <code class="literal">COLLATE</code> and <code class="literal">CTYPE</code>
settings of the current database. If there is no such
collation, then this column and the associated schema and
catalog columns are null.
</td></tr></tbody></table></div></div><br class="table-break" /></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="infoschema-attributes.html" title="36.6. attributes">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="information-schema.html" title="Chapter 36. The Information Schema">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="infoschema-check-constraint-routine-usage.html" title="36.8. check_constraint_routine_usage">Next</a></td></tr><tr><td width="40%" align="left" valign="top">36.6. <code xmlns="http://www.w3.org/1999/xhtml" class="literal">attributes</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 36.8. <code xmlns="http://www.w3.org/1999/xhtml" class="literal">check_constraint_routine_usage</code></td></tr></table></div></body></html>