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

Поиск
Список
Период
Сортировка
От Alexey Klyukin
Тема Re: the '::' cast doesn't work in the FROM clause
Дата
Msg-id 1804685E-C378-49E1-B12C-96078B221102@commandprompt.com
обсуждение исходный текст
Ответ на Re: the '::' cast doesn't work in the FROM clause  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: the '::' cast doesn't work in the FROM clause  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
On Aug 29, 2011, at 5:02 PM, Kevin Grittner wrote:

> Alexey Klyukin <alexk@commandprompt.com> wrote:
>=20
>> 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.
>=20
> 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? Do=
esn't this break the promise of equivalency between the 'CAST .. ' and '::'?

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

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: the '::' cast doesn't work in the FROM clause
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: the '::' cast doesn't work in the FROM clause