Re: [HACKERS] [6.5.3] 'attribute not found'

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Don Baccus <dhogaza(at)pacifier(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] [6.5.3] 'attribute not found'
Date: 2000-01-28 15:25:36
Message-ID: 3891B4F0.DDA4887B@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> >No, it shouldn't. Labeling SELECT output columns with AS doesn't
> >affect the namespace visible in the WHERE clause (since WHERE is
> >"upstream" of the SELECT outputs).
> > If we had sub-selects in FROM,
> >I believe that AS would determine the column names seen outside
> >the sub-select ("downstream").
> >Also, you can use the AS names in ORDER BY, which is also "downstream"
> >of forming the results. (I think we currently accept them in GROUP BY
> >as well, but I suspect that that is not in compliance with the
> >standard...)
> After the discussion a few weeks ago I tried to decide by reading Date
> (which I bought in part of the discussion, figuring it was about time)
> and decided I couldn't tell for sure...

Oh puhleez! Date... about time... Or maybe finding that funny means
I've been working on this stuff *way* too long :)

Anyway, afaik we will have the capability in 7.0 to specify column
aliases in AS clauses like this:

postgres=# select a+b from t1 as tx (a), t1 as ty (b);
?column?
----------
2
(1 row)

This is actually running on my computer now; I'm starting to rework
the "outer join syntax" and will then do a commit.

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2000-01-28 15:40:20 Re: [HACKERS] Re: ORDBMS
Previous Message Tom Lane 2000-01-28 15:08:16 Re: [HACKERS] Re: ORDBMS