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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Cristian Cruz" <danielcristian(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4037: Manual bug: 2.5. Querying a Table
Date: 2008-03-14 23:08:04
Message-ID: 27448.1205536084@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Daniel Cristian Cruz" <danielcristian(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexey 2008-03-15 12:36:09 BUG #4038: Problem with locale changing by initdb
Previous Message Daniel Cristian Cruz 2008-03-14 21:40:59 BUG #4037: Manual bug: 2.5. Querying a Table