Re: the '::' cast doesn't work in the FROM clause

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: <alexk(at)commandprompt(dot)com>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: the '::' cast doesn't work in the FROM clause
Date: 2011-08-29 14:00:21
Message-ID: 4E5B552502000025000407EB@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2011-08-29 14:02:57 Re: the '::' cast doesn't work in the FROM clause
Previous Message Merlin Moncure 2011-08-29 13:45:44 Re: the '::' cast doesn't work in the FROM clause