Hi,
Is it possible to do the equivalent of let-bindings in a pure SQL function?
I have a SELECT that invokes "now" multiple times. It would be nicer
to do it only once and reuse the value. Something like this:
LET right_now = SELECT now () IN
SELECT * FROM my_table WHERE right_now >= start AND ...
In PL/pgSQL this is easy, but I wonder about SQL...
Thanks in advance!
Jon