postgres.git / summary / log / commit / refs

commit    2af8894c409d0464d4f29449ac39d7d229ccc6ef
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Mar 23 16:42:16 2020 +0000
First released in: 13.0, 9.5.22, 9.6.18, 10.13, 11.8, 12.3

    Doc: explain that LIKE et al can be used in ANY (sub-select) etc.
    
    This wasn't stated anywhere, and it's perhaps not that obvious,
    since we get questions about it from time to time.  Also undocumented
    was that the parser actually translates these into operators.
    
    Discussion: https://postgr.es/m/CAFj8pRBkvZ71BqGKZnBBG4=0cKG+s50Dy+DYmrizUKEpAtdc+w@mail.gmail.com


doc/src/sgml/func.sgml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index f196c6bc8bd..e356774586b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -3709,7 +3709,23 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> <literal>!~~</literal> and <literal>!~~*</literal> operators that represent <function>NOT LIKE</function> and <function>NOT ILIKE</function>, respectively. All of these operators are - <productname>PostgreSQL</productname>-specific. + <productname>PostgreSQL</productname>-specific. You may see these + operator names in <command>EXPLAIN</command> output and similar + places, since the parser actually translates <function>LIKE</function> + et al. to these operators. + </para> + + <para> + The phrases <function>LIKE</function>, <function>ILIKE</function>, + <function>NOT LIKE</function>, and <function>NOT ILIKE</function> are + generally treated as operators + in <productname>PostgreSQL</productname> syntax; for example they can + be used in <replaceable>expression</replaceable> + <replaceable>operator</replaceable> ANY + (<replaceable>subquery</replaceable>) constructs, although + an <literal>ESCAPE</literal> clause cannot be included there. In some + obscure cases it may be necessary to use the underlying operator names + instead. </para> </sect2> [parent: 5f9eace5db4e]