Re: Simple SQL - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Simple SQL
Date
Msg-id 20031024111303.GC27673@dcc.uchile.cl
Whole thread Raw
In response to Re: Simple SQL  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: Simple SQL
List pgsql-general
On Fri, Oct 24, 2003 at 07:25:44AM +0200, Pavel Stehule wrote:
> Not
>
> SELECT 1 as a, a*2;
> ERROR:  column "a" does not exist

But you can try

SELECT a, a*a FROM (select 1 as a);

> On Tue, 21 Oct 2003, Bob Messenger wrote:
>
> > Is it possible to do something like:
> >
> >     select 1 as a, a*a;
> >
> > in postgres?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hay que recordar que la existencia en el cosmos, y particularmente la
elaboración de civilizaciones dentre de él no son, por desgracia,
nada idílicas" (Ijon Tichy)

pgsql-general by date:

Previous
From: Paul Thomas
Date:
Subject: Re: Pgsql 7.3.3 on redhat 7.2
Next
From: TommyC
Date:
Subject: unsubscribe