AS s(a) vs. AS a - Mailing list pgsql-general

From Thalis Kalfigkopoulos
Subject AS s(a) vs. AS a
Date
Msg-id CAEkCx9G5iXKYhhkOEXycriw5Z+PeFFPQF2a6KawZztWb00E0QQ@mail.gmail.com
Whole thread Raw
Responses Re: AS s(a) vs. AS a  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to raise index points when equal and like is used with gist?
Next
From: Vishalakshi Navaneethakrishnan
Date:
Subject: Postgres DB Migration from 8.3 to 9.1