On Aug 29, 2011, at 5:02 PM, Kevin Grittner wrote:

> Alexey Klyukin <al...@commandprompt.com> wrote:
> 
>> Function calls can appear in the FROM clause. (This is especially
>> useful for functions that return result sets, but any function can
>> be used.) This acts as though its output were created as a
>> temporary table for the duration of this single SELECT command.
> 
> It doesn't say that operators which provide equivalent functionality
> to functions can also be used.

I agree, but why is it possible to use the type casting with CAST there? 
Doesn't this break the promise of equivalency between the 'CAST .. ' and '::'?

select val from CAST(random() as integer) as val;
 val 
-----
   1
(1 row)

--
Alexey Klyukin        http://www.commandprompt.com
The PostgreSQL Company – Command Prompt, Inc.





-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to