Re: @ operator

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Антон Бушмелев <bushmelev(dot)aa(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: @ operator
Date: 2015-09-17 17:34:24
Message-ID: CAKFQuwYdzd+=wde52AMnN1_rQrCEQP4d-zbKQnDfq-t96Kx90Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, September 17, 2015, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Thursday, September 17, 2015, Антон Бушмелев <bushmelev(dot)aa(at)gmail(dot)com
> <javascript:_e(%7B%7D,'cvml','bushmelev(dot)aa(at)gmail(dot)com');>> wrote:
>
>> Hello, google nothing for @ operator =(, what does this mean field1 <@
>> ( subquery ) ?
>>
>>
> It would depend on what field1 is.
>
> Typically <@ is a contains/contained-by operator. Is this context the
> subquery is checked to see if it contains the value of field1.
>
> David J.
>

To clarify I think that it means that for each row returned by the
subquery, the value of filed1 is checked to see if the field in the
subquery contains the given value. Use use ANY/ALL to indicate whether to
care if on,y so,e rows or all rows need match in order for the entire
expression to pass.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-09-17 17:50:18 Re: Shouldn't "WHEN (OLD.* IS DISTINCT FROM NEW.*)" clause be independent from data type?
Previous Message Quiroga, Damian 2015-09-17 17:32:16 Hiding name and version