Re: BUG #4037: Manual bug: 2.5. Querying a Table

Поиск
Список
Период
Сортировка
От Daniel Cristian Cruz
Тема Re: BUG #4037: Manual bug: 2.5. Querying a Table
Дата
Msg-id 48d0cacb0803151134y116abacbv5e7722661e9b80e8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #4037: Manual bug: 2.5. Querying a Table  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #4037: Manual bug: 2.5. Querying a Table  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
Humm...

Reading this way... It sounds like I could write something like this:

SELECT city, (temp_hi+temp_lo)/2 temp_avg, date FROM weather;

Like it work with tables...

2008/3/14, Tom Lane <tgl@sss.pgh.pa.us>:
>
> "Daniel Cristian Cruz" <danielcristian@gmail.com> writes:
> > Where it says:
>
> > "Notice how the AS clause is used to relabel the output column. (The AS
> > clause is optional.)"
>
> > It's wrong, because it causes an error if executed without it.
>
> Hmm?  You can leave off the AS clause if you want:
>
> SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, date FROM weather;
> SELECT city, (temp_hi+temp_lo)/2, date FROM weather;
>
>                         regards, tom lane
>



--
Daniel Cristian Cruz
$B%/%k%:(B  $B%/%j%9%A%"%s(B $B%@%K%(%k(B

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: BUG #4035: sql table aliases do not work
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #4037: Manual bug: 2.5. Querying a Table