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

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: the '::' cast doesn't work in the FROM clause
Дата
Msg-id CAHyXU0wyZPjR1iC7yKzTn8t1ZD4vXMPQW8PwdbxFeDH+aCm9uw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: the '::' cast doesn't work in the FROM clause  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
On Mon, Aug 29, 2011 at 9:00 AM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Merlin Moncure <mmoncure@gmail.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). =A0It 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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: the '::' cast doesn't work in the FROM clause
Следующее
От: "Steven Williams"
Дата:
Сообщение: BUG #6182: /etc/init.d/postgresql-8.4 is incomplete for chkconfig