Re: Question, how intelligent is optimizer with subplans? - Mailing list pgsql-general

From Greg Stark
Subject Re: Question, how intelligent is optimizer with subplans?
Date
Msg-id 87d6mrvcwy.fsf@stark.dyndns.tv
Whole thread Raw
In response to Question, how intelligent is optimizer with subplans?  (Gregory Stark <gsstark@mit.edu>)
Responses Re: Question, how intelligent is optimizer with subplans?
List pgsql-general

On second thought what I wanted to do should work, I think. I'm not clear why
the first of these works fine but the second doesn't. What I want to do is
effectively the second of these:


slo=> select (select count(*) from t2) as x from t order by x;
 x
---
 0
(1 row)

slo=> select (select count(*) from t2) as x from t order by sign(x);
ERROR:  Attribute "x" not found

--
greg

pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Question, how intelligent is optimizer with subplans?
Next
From: Michael Meskes
Date:
Subject: Re: Altering a table - positioning new columns