2003-06-27 16:45:32 +02:00
|
|
|
<!--
|
2010-09-20 22:08:53 +02:00
|
|
|
doc/src/sgml/ref/alter_opclass.sgml
|
2003-06-27 16:45:32 +02:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
2017-10-20 03:16:39 +02:00
|
|
|
<refentry id="sql-alteropclass">
|
2014-02-24 03:25:35 +01:00
|
|
|
<indexterm zone="sql-alteropclass">
|
|
|
|
<primary>ALTER OPERATOR CLASS</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2003-06-27 16:45:32 +02:00
|
|
|
<refmeta>
|
2010-04-03 09:23:02 +02:00
|
|
|
<refentrytitle>ALTER OPERATOR CLASS</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
2003-06-27 16:45:32 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ALTER OPERATOR CLASS</refname>
|
|
|
|
<refpurpose>change the definition of an operator class</refpurpose>
|
2010-11-23 21:27:50 +01:00
|
|
|
</refnamediv>
|
|
|
|
|
2003-06-27 16:45:32 +02:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2015-07-10 13:28:34 +02:00
|
|
|
RENAME TO <replaceable>new_name</replaceable>
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
|
|
|
ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2020-09-17 11:39:28 +02:00
|
|
|
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
|
|
|
ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2015-07-10 13:28:34 +02:00
|
|
|
SET SCHEMA <replaceable>new_schema</replaceable>
|
2003-06-27 16:45:32 +02:00
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-06-27 16:45:32 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER OPERATOR CLASS</command> changes the definition of
|
2004-06-25 23:55:59 +02:00
|
|
|
an operator class.
|
2003-06-27 16:45:32 +02:00
|
|
|
</para>
|
2005-10-14 00:44:51 +02:00
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
You must own the operator class to use <command>ALTER OPERATOR CLASS</command>.
|
2005-10-14 00:44:51 +02:00
|
|
|
To alter the owner, you must also be a direct or indirect member of the new
|
|
|
|
owning role, and that role must have <literal>CREATE</literal> privilege on
|
|
|
|
the operator class's schema. (These restrictions enforce that altering the
|
|
|
|
owner doesn't do anything you couldn't do by dropping and recreating the
|
|
|
|
operator class. However, a superuser can alter ownership of any operator
|
|
|
|
class anyway.)
|
|
|
|
</para>
|
2003-06-27 16:45:32 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-06-27 16:45:32 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of an existing operator
|
|
|
|
class.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">index_method</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the index method this operator class is for.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">new_name</replaceable></term>
|
2003-06-27 16:45:32 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new name of the operator class.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-06-25 23:55:59 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">new_owner</replaceable></term>
|
2004-06-25 23:55:59 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new owner of the operator class.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2010-11-26 23:27:23 +01:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">new_schema</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new schema for the operator class.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-06-25 23:55:59 +02:00
|
|
|
</variablelist>
|
2003-06-27 16:45:32 +02:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There is no <command>ALTER OPERATOR CLASS</command> statement in
|
|
|
|
the SQL standard.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
2017-11-23 15:39:47 +01:00
|
|
|
<member><xref linkend="sql-createopclass"/></member>
|
|
|
|
<member><xref linkend="sql-dropopclass"/></member>
|
|
|
|
<member><xref linkend="sql-alteropfamily"/></member>
|
2003-06-27 16:45:32 +02:00
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|