Re: Reusing columns in SELECT list - Mailing list pgsql-novice

From Tom Lane
Subject Re: Reusing columns in SELECT list
Date
Msg-id 28240.1139840978@sss.pgh.pa.us
Whole thread Raw
In response to Reusing columns in SELECT list  (Andre Majorel <aym-lqsgp@teaser.fr>)
List pgsql-novice
Andre Majorel <aym-lqsgp@teaser.fr> writes:
> Is there a way to reuse in the SELECT list columns defined earlier
> in it ?

No.

You can use multiple levels of select:

select xy, xy + xy from (select x * y as xy from a,b) ss;

but this is not likely to save any computation, just typing.

            regards, tom lane

pgsql-novice by date:

Previous
From: Andre Majorel
Date:
Subject: Reusing columns in SELECT list
Next
From: "Luis Silva"
Date:
Subject: Re: substring result