2007/9/15, rihad <rihad(at)mail(dot)ru>:
> How can I efficiently return the minimum/maximum of two given
> expressions? Like SELECT MYMIN(a+b-c,d+e*f).
>
> Thanks.
Hello
use function GREATEST (maximim) or LEAST (minimum)
http://www.postgresql.org/docs/8.2/interactive/functions-conditional.html#AEN13148
Regards
Pavel Stehule