'Access PostgreSQL SELECT list in WHERE clause

Does PostgreSQL support access the SELECT list in the WHERE clause somehow? Was not able to find any documentation about it.

Example 1:

SELECT my_column as xpto FROM my_table WHERE other_column = xpto

I'm using the example above as a usage only, I know it does not make sense.

Example 2:

Considering my_column as a Datetime column.

SELECT my_column + interval '1 year' as xpto FROM my_table WHERE other_column >= xpto

The example above may lead to a better usage example of it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source