Liam Ferris Liam Ferris - 25 days ago 5
Java Question

What does the '@>' symbol mean in postgesql?

I'm working on a project that uses a PostgreSQL database.

There's a few locations in the project which build queries like this:

query += " AND " + String + " @> " + String;


I'm not familiar with the
@>
symbol, and neither is anyone currently working on the project. Also googling it doesn't work, presumably as it's an odd symbol.

Also, Im not sure if this symbol is a postgesql thing or a sql thing.

P.S. The application in written in java.

Answer

It's contains. If the column is array and use @> the column should contain the value.

More here: https://www.postgresql.org/docs/9.1/static/functions-array.html