| 1 |
<!-- |
| 2 |
doc/src/sgml/ref/alter_conversion.sgml |
| 3 |
PostgreSQL documentation |
| 4 |
--> |
| 5 |
|
| 6 |
<refentry id="sql-alterconversion"> |
| 7 |
<indexterm zone="sql-alterconversion"> |
| 8 |
<primary>ALTER CONVERSION</primary> |
| 9 |
</indexterm> |
| 10 |
|
| 11 |
<refmeta> |
| 12 |
<refentrytitle>ALTER CONVERSION</refentrytitle> |
| 13 |
<manvolnum>7</manvolnum> |
| 14 |
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
| 15 |
</refmeta> |
| 16 |
|
| 17 |
<refnamediv> |
| 18 |
<refname>ALTER CONVERSION</refname> |
| 19 |
<refpurpose>change the definition of a conversion</refpurpose> |
| 20 |
</refnamediv> |
| 21 |
|
| 22 |
<refsynopsisdiv> |
| 23 |
<synopsis> |
| 24 |
ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>new_name</replaceable> |
| 25 |
ALTER CONVERSION <replaceable>name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER } |
| 26 |
ALTER CONVERSION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_schema</replaceable> |
| 27 |
</synopsis> |
| 28 |
</refsynopsisdiv> |
| 29 |
|
| 30 |
<refsect1> |
| 31 |
<title>Description</title> |
| 32 |
|
| 33 |
<para> |
| 34 |
<command>ALTER CONVERSION</command> changes the definition of a |
| 35 |
conversion. |
| 36 |
</para> |
| 37 |
|
| 38 |
<para> |
| 39 |
You must own the conversion to use <command>ALTER CONVERSION</command>. |
| 40 |
To alter the owner, you must be able to <literal>SET ROLE</literal> to the |
| 41 |
new owning role, and that role must have <literal>CREATE</literal> |
| 42 |
privilege on the conversion's schema. |
| 43 |
(These restrictions enforce that altering the |
| 44 |
owner doesn't do anything you couldn't do by dropping and recreating the |
| 45 |
conversion. However, a superuser can alter ownership of any conversion |
| 46 |
anyway.) |
| 47 |
</para> |
| 48 |
</refsect1> |
| 49 |
|
| 50 |
<refsect1> |
| 51 |
<title>Parameters</title> |
| 52 |
|
| 53 |
<variablelist> |
| 54 |
<varlistentry> |
| 55 |
<term><replaceable class="parameter">name</replaceable></term> |
| 56 |
<listitem> |
| 57 |
<para> |
| 58 |
The name (optionally schema-qualified) of an existing conversion. |
| 59 |
</para> |
| 60 |
</listitem> |
| 61 |
</varlistentry> |
| 62 |
|
| 63 |
<varlistentry> |
| 64 |
<term><replaceable class="parameter">new_name</replaceable></term> |
| 65 |
<listitem> |
| 66 |
<para> |
| 67 |
The new name of the conversion. |
| 68 |
</para> |
| 69 |
</listitem> |
| 70 |
</varlistentry> |
| 71 |
|
| 72 |
<varlistentry> |
| 73 |
<term><replaceable class="parameter">new_owner</replaceable></term> |
| 74 |
<listitem> |
| 75 |
<para> |
| 76 |
The new owner of the conversion. |
| 77 |
</para> |
| 78 |
</listitem> |
| 79 |
</varlistentry> |
| 80 |
|
| 81 |
<varlistentry> |
| 82 |
<term><replaceable class="parameter">new_schema</replaceable></term> |
| 83 |
<listitem> |
| 84 |
<para> |
| 85 |
The new schema for the conversion. |
| 86 |
</para> |
| 87 |
</listitem> |
| 88 |
</varlistentry> |
| 89 |
</variablelist> |
| 90 |
</refsect1> |
| 91 |
|
| 92 |
<refsect1> |
| 93 |
<title>Examples</title> |
| 94 |
|
| 95 |
<para> |
| 96 |
To rename the conversion <literal>iso_8859_1_to_utf8</literal> to |
| 97 |
<literal>latin1_to_unicode</literal>: |
| 98 |
<programlisting> |
| 99 |
ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode; |
| 100 |
</programlisting> |
| 101 |
</para> |
| 102 |
|
| 103 |
<para> |
| 104 |
To change the owner of the conversion <literal>iso_8859_1_to_utf8</literal> to |
| 105 |
<literal>joe</literal>: |
| 106 |
<programlisting> |
| 107 |
ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe; |
| 108 |
</programlisting></para> |
| 109 |
</refsect1> |
| 110 |
|
| 111 |
<refsect1> |
| 112 |
<title>Compatibility</title> |
| 113 |
|
| 114 |
<para> |
| 115 |
There is no <command>ALTER CONVERSION</command> statement in the SQL |
| 116 |
standard. |
| 117 |
</para> |
| 118 |
</refsect1> |
| 119 |
|
| 120 |
<refsect1> |
| 121 |
<title>See Also</title> |
| 122 |
|
| 123 |
<simplelist type="inline"> |
| 124 |
<member><xref linkend="sql-createconversion"/></member> |
| 125 |
<member><xref linkend="sql-dropconversion"/></member> |
| 126 |
</simplelist> |
| 127 |
</refsect1> |
| 128 |
</refentry> |