what does the @> operator in postgres do?

Postgresql

Postgresql Problem Overview


I came across a query in postgres here which uses the @> operator on earth objects.

I've searched everywhere, but have come up empty on the meaning of this operator (and likely others like it, eg: @<, etc...).

> is obvious. I also found that @ will take the absolute value of something. So my best guess is this does an absolute greater than comparison of two values?

Is that correct? Is this documented somewhere in the postgres docs? I'm even more curious to understand what the operator does on earth objects.

Thanks!

Postgresql Solutions


Solution 1 - Postgresql

Solution 2 - Postgresql

According to the PostgreSQL Official Documentation

> interval values can be written using the following verbose syntax: > > [@] quantity unit [quantity unit...] [direction] where quantity is a > number (possibly signed); unit is microsecond, millisecond, second, > minute, hour, day, week, month, year, decade, century, millennium, or > abbreviations or plurals of these units; direction can be ago or > empty. The at sign (@) is optional noise. The amounts of the different > units are implicitly added with appropriate sign accounting. ago > negates all the fields. This syntax is also used for interval output, > if IntervalStyle is set to postgres_verbose.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlostdorjeView Question on Stackoverflow
Solution 1 - Postgresqla_horse_with_no_nameView Answer on Stackoverflow
Solution 2 - PostgresqlPIERRE PICAVETView Answer on Stackoverflow