For example using SQL I can do:
SELECT (a+b) as c FROM table WHERE c < 5 AND (c*c+t) > 100;
Is there any way to do that using Postgres?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This could be an alternative you might use:
From a performance point of view, I think it’s not an optimal solution (because of the lack of WHERE clause of foo subquery, hence returning all table records). I don’t know if Postgresql does some query optimization there.