AS s(a) vs. AS a

From: Thalis Kalfigkopoulos <tkalfigo(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: AS s(a) vs. AS a
Date: 2012-10-11 22:39:18
Message-ID: CAEkCx9G5iXKYhhkOEXycriw5Z+PeFFPQF2a6KawZztWb00E0QQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all.

I see in the docs the following:
SELECT current_date + s.a AS dates FROM generate_series(0,14,7) AS s(a);

Trying it as:
SELECT current_date + a AS dates FROM generate_series(0,14,7) AS a;

yields exactly the same result.

Does the finer granularity/expressiveness offer some extra
functionality in some cases or is it a matter of style?

regards,
--Thalis

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2012-10-12 00:10:08 Re: non-integer constant in ORDER BY: why exactly, and documentation?
Previous Message Tom Lane 2012-10-11 22:18:00 Re: Expensive log_line_prefix ?