Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the <@ operator in PostgreSQL 8.4?

I am having trouble decyphering what this operator is doing. I know that it is somehow comparing the array's, but I can find no documentation on it. I also have tried >@ but that seems to error. Google yealded bad results ad when I search for "at operator" it isn't very specific. Any information would be much appreciated.

I also have not (at least I don't think so) defined any new operators in the database.

SELECT id 
FROM organizations
WHERE  ARRAY[56] <@ ancestry
like image 525
Blake Visin Avatar asked Oct 18 '25 01:10

Blake Visin


1 Answers

From the manual:

<@  is contained by

When your array ancestry has the value 56, the result will be true.

like image 188
Frank Heikens Avatar answered Oct 20 '25 12:10

Frank Heikens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!