]> begriffs open source - ai-pg/blob - full-docs/src/sgml/man7/ALTER_CONVERSION.7
PG 18 docs from https://ftp.postgresql.org/pub/source/v18.0/postgresql-18.0-docs...
[ai-pg] / full-docs / src / sgml / man7 / ALTER_CONVERSION.7
1 '\" t
2 .\"     Title: ALTER CONVERSION
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "ALTER CONVERSION" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 ALTER_CONVERSION \- change the definition of a conversion
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 ALTER CONVERSION \fIname\fR RENAME TO \fInew_name\fR
36 ALTER CONVERSION \fIname\fR OWNER TO { \fInew_owner\fR | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
37 ALTER CONVERSION \fIname\fR SET SCHEMA \fInew_schema\fR
38 .fi
39 .SH "DESCRIPTION"
40 .PP
41 \fBALTER CONVERSION\fR
42 changes the definition of a conversion\&.
43 .PP
44 You must own the conversion to use
45 \fBALTER CONVERSION\fR\&. To alter the owner, you must be able to
46 SET ROLE
47 to the new owning role, and that role must have
48 CREATE
49 privilege on the conversion\*(Aqs schema\&. (These restrictions enforce that altering the owner doesn\*(Aqt do anything you couldn\*(Aqt do by dropping and recreating the conversion\&. However, a superuser can alter ownership of any conversion anyway\&.)
50 .SH "PARAMETERS"
51 .PP
52 \fIname\fR
53 .RS 4
54 The name (optionally schema\-qualified) of an existing conversion\&.
55 .RE
56 .PP
57 \fInew_name\fR
58 .RS 4
59 The new name of the conversion\&.
60 .RE
61 .PP
62 \fInew_owner\fR
63 .RS 4
64 The new owner of the conversion\&.
65 .RE
66 .PP
67 \fInew_schema\fR
68 .RS 4
69 The new schema for the conversion\&.
70 .RE
71 .SH "EXAMPLES"
72 .PP
73 To rename the conversion
74 iso_8859_1_to_utf8
75 to
76 latin1_to_unicode:
77 .sp
78 .if n \{\
79 .RS 4
80 .\}
81 .nf
82 ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode;
83 .fi
84 .if n \{\
85 .RE
86 .\}
87 .PP
88 To change the owner of the conversion
89 iso_8859_1_to_utf8
90 to
91 joe:
92 .sp
93 .if n \{\
94 .RS 4
95 .\}
96 .nf
97 ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe;
98 .fi
99 .if n \{\
100 .RE
101 .\}
102 .SH "COMPATIBILITY"
103 .PP
104 There is no
105 \fBALTER CONVERSION\fR
106 statement in the SQL standard\&.
107 .SH "SEE ALSO"
108 CREATE CONVERSION (\fBCREATE_CONVERSION\fR(7)), DROP CONVERSION (\fBDROP_CONVERSION\fR(7))