Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name

From: Justin <zzzzz(dot)graf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name
Date: 2019-02-27 01:15:41
Message-ID: CALL-XeO3NFmxPv=5qg9u75N8d3389+sg0iVVdoRocwwFB7H43g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Tom
attached is the SQL file for the 4 tables. if you need data not a problem
the data in the table is junk/test entries

also attached is the screen shot of the error in pgadmin then the same
command run without the AS
[image: image.png]
[image: image.png]

On Tue, Feb 26, 2019 at 5:56 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > I believe I found an obscure bug with the window function
>
> Hm, could we see a self-contained example, ie with the underlying
> table/view definitions too? Probably don't need any sample data
> for this type of problem, but I'm unexcited about trying to reverse-
> engineer your table definitions enough to reproduce the problem.
>
> > The error occurs when I put the query into a LEFT JOIN:
>
> > select counts.count,
> > caldetail.*, calprorules_desired_value, calprorules_stdpreceision,
>
> I'm wondering why this didn't already fail at "counts.count", because with
> the "AS howmany" in place, that sub-select isn't returning any column
> named "count". I kind of suspect user error due to ambiguous column
> names, but the details aren't obvious.
>
> regards, tom lane
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2019-02-27 01:56:29 Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name
Previous Message Tom Lane 2019-02-26 22:56:26 Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name