markdown/reference/sql/ALTER-CONVERSION.html.md.erb (33 lines of code) (raw):

--- title: ALTER CONVERSION --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> Changes the definition of a CONVERSION. ## <a id="topic1__section2"></a>Synopsis ``` pre ALTER CONVERSION <name> RENAME TO <newname> ALTER CONVERSION <name> OWNER TO <newowner> ``` ## <a id="topic1__section3"></a>Description `ALTER CONVERSION` changes the definition of a conversion. You must own the conversion to use `ALTER CONVERSION`. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have `CREATE` privilege on the conversion's schema. (These restrictions enforce that altering the owner does not do anything you could not do by dropping and recreating the conversion. However, a superuser can always alter ownership of any conversion.). ## <a id="topic1__section4"></a>Parameters <dt>\<name\> </dt> <dd>The (optionally schema-qualified) name of an existing conversion.</dd> <dt>\<newname\> </dt> <dd>The new name of the conversion.</dd> <dt>\<newowner\> </dt> <dd>The new owner of the conversion.</dd> ## <a id="topic1__section5"></a>Examples To rename the conversion `iso_8859_1_to_utf8` to `latin1_to_unicode`: ``` pre ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode; ``` To change the owner of the conversion `iso_8859_1_to_utf8` to `joe`: ``` pre ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe; ``` ## <a id="topic1__section6"></a>Compatibility There is no ALTER CONVERSION statement in the SQL standard. ## <a id="topic1__section7"></a>See Also [CREATE CONVERSION](CREATE-CONVERSION.html), [DROP CONVERSION](DROP-CONVERSION.html)