Re: Question, how intelligent is optimizer with subplans?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Gregory Stark <gsstark(at)MIT(dot)EDU>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question, how intelligent is optimizer with subplans?
Date: 2003-01-20 19:28:29
Message-ID: 87d6mrvcwy.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Meskes 2003-01-20 19:38:18 Re: Altering a table - positioning new columns
Previous Message Gregory Stark 2003-01-20 19:14:11 Question, how intelligent is optimizer with subplans?