Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> yeah, that's the correct way, but why does this work?
> select val from random() as val;
If you look at the PostgreSQL reference docs for the SELECT
statement, a from_item can be a SELECT statement in parentheses or a
function call (among other things). It cannot be an arbitrary
expression containing operators (like ::).
-Kevin