1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-24 06:01:07 +03:00

Allow schema-qualified operator names to be used in the optional

arguments of CREATE OPERATOR.
This commit is contained in:
Tom Lane
2002-08-10 19:01:53 +00:00
parent f1d820494c
commit a5e6e99357
4 changed files with 55 additions and 56 deletions

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.29 2002/05/18 15:44:47 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.30 2002/08/10 19:01:53 tgl Exp $
PostgreSQL documentation
-->
@@ -437,6 +437,15 @@ MYBOXES.description === box '((0,0), (1,1))'
Refer to <command>DROP OPERATOR</command> to delete
user-defined operators from a database.
</para>
<para>
To give a schema-qualified operator name in <replaceable
class="parameter">com_op</replaceable> or the other optional
arguments, use the <literal>OPERATOR()</> syntax, for example
<programlisting>
COMMUTATOR = OPERATOR(myschema.===) ,
</programlisting>
</para>
</refsect2>
</refsect1>

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.64 2002/08/05 19:43:31 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.65 2002/08/10 19:01:53 tgl Exp $
-->
<chapter id="sql-syntax">
@@ -755,7 +755,7 @@ SELECT (5 !) - 6;
</row>
<row>
<entry><token>LIKE</token> <token>ILIKE</token></entry>
<entry><token>LIKE</token> <token>ILIKE</token> <token>SIMILAR</token></entry>
<entry></entry>
<entry>string pattern matching</entry>
</row>
@@ -801,6 +801,17 @@ SELECT (5 !) - 6;
the same precedence as the built-in <quote>+</quote> operator, no
matter what yours does.
</para>
<para>
When a schema-qualified operator name is used in the
<literal>OPERATOR</> syntax, as for example in
<programlisting>
SELECT 3 OPERATOR(pg_catalog.+) 4;
</programlisting>
the <literal>OPERATOR</> construct is taken to have the default precedence
shown above for <quote>any other</> operator. This is true no matter
which specific operator name appears inside <literal>OPERATOR()</>.
</para>
</sect2>
</sect1>