@ operator

Started by Антон Бушмелевover 10 years ago6 messagesgeneral
Jump to latest
#1Антон Бушмелев
bushmelev.aa@gmail.com

Hello, google nothing for @ operator =(, what does this mean field1 <@ ( subquery ) ?

ps: sorry for my english

#2Igor Neyman
ineyman@perceptron.com
In reply to: Антон Бушмелев (#1)
Re: @ operator

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of ????? ????????
Sent: Thursday, September 17, 2015 9:11 AM
To: pgsql-general@postgresql.org
Cc: Антон Бушмелев <bushmelev.aa@gmail.com>
Subject: [GENERAL] @ operator

Hello, google nothing for @ operator =(, what does this mean field1 <@ ( subquery ) ?

ps: sorry for my English

Could be absolute-value operator for numeric data types,
or array (or range) inclusion operator.

See PG docs (and these docs should be your first option, before googling):
http://www.postgresql.org/docs/9.4/static/typeconv-oper.html

Regards,
Igor Neyman

#3David G. Johnston
david.g.johnston@gmail.com
In reply to: Антон Бушмелев (#1)
Re: @ operator

On Thursday, September 17, 2015, Антон Бушмелев <bushmelev.aa@gmail.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.

#4John McKown
john.archie.mckown@gmail.com
In reply to: Антон Бушмелев (#1)
Re: @ operator

Your English is fine. @< is an "array is contained by" operator:

http://www.postgresql.org/docs/9.4/interactive/functions-array.html

I assume that field1 is an array, as opposed to just a simple value
variable. A simple value variable would be tested with something like:
field1 IN ( subquery) . The @< tests that every value in the array field1
is also in the subquery. The subquery might contain other values, but it
will contain _all_ values in field1.

On Thu, Sep 17, 2015 at 8:10 AM, Антон Бушмелев <bushmelev.aa@gmail.com>
wrote:

Hello, google nothing for @ operator =(, what does this mean field1 <@
( subquery ) ?

ps: sorry for my english

--

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

#5David G. Johnston
david.g.johnston@gmail.com
In reply to: David G. Johnston (#3)
Re: @ operator

On Thursday, September 17, 2015, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Thursday, September 17, 2015, Антон Бушмелев <bushmelev.aa@gmail.com
<javascript:_e(%7B%7D,'cvml','bushmelev.aa@gmail.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.

#6Антон Бушмелев
bushmelev.aa@gmail.com
In reply to: David G. Johnston (#5)
Re: @ operator

Thanks for reply, it is clear now =)

Show quoted text

On 09/17/2015 08:34 PM, David G. Johnston wrote:

On Thursday, September 17, 2015, David G. Johnston
<david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:

On Thursday, September 17, 2015, Антон Бушмелев
<bushmelev.aa@gmail.com
<javascript:_e(%7B%7D,'cvml','bushmelev.aa@gmail.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.