On Mon, Aug 29, 2011 at 9:00 AM, Kevin Grittner <[email protected]> wrote: > Merlin Moncure <[email protected]> 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 ::).
right -- duh. I knew that...the canonical case for this is the definition of pg_locks view. I've just never seen it used for a regular scalar function. The whole thing is pretty peculiar IMO (but useful occasionally). merlin -- Sent via pgsql-bugs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
