From: Tom Lane <tgl@sss.pgh.pa.us>
To: zzzzz.graf@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name
Date: Tue, 26 Feb 2019 17:56:26 -0500
Message-ID: <15647.1551221786@sss.pgh.pa.us> (raw)
In-Reply-To: <15658-10b53866d3800951@postgresql.org>
References: <15658-10b53866d3800951@postgresql.org>
PG Bug reporting form <noreply@postgresql.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, zzzzz.graf@gmail.com
Subject: Re: BUG #15658: Window Function in a left join using AS or alias for the cloumn name
In-Reply-To: <15647.1551221786@sss.pgh.pa.us>
References: <15658-10b53866d3800951@postgresql.org> <15647.1551221786@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox