What does @ do in Postgres function calls?

I am trying to understand what @ does in a call to the Postgres function. This is the worst term for google or documentation search.

I can do:

SELECT @extract(epoch FROM valid_to - valid_from) FROM...

and

SELECT extract(epoch FROM valid_to - valid_from) FROM...

both seem to work. I found the version with @ in the example, and I just can’t find its purpose in any documentation or search query.

Who knows what it is or can indicate where to read more?

+4
source share
1 answer

A symbol @is an operator for an absolute value ; it is the same as abs(val). This does nothing more written before calling the function than getting the absolute value of the result of the returned function, if it is valid (type of number).

+3

Source: https://habr.com/ru/post/1684879/


All Articles