Re: CTE containing ambiguous columns - Mailing list pgsql-hackers

From Dan Colish
Subject Re: CTE containing ambiguous columns
Date
Msg-id 7c21e7d30911131337q167eae45j2cc75b4cecdb70af@mail.gmail.com
Whole thread Raw
In response to Re: CTE containing ambiguous columns  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> Can't you disambiguate it using a column list on beings?

Sure, after I figured out what the real problem was.  Maybe I'm a
dope, but when I get an error cursor pointed at an ambiguous column
reference, my thought is "oh, I need to qualify that reference" - not
"oh, some completely unrelated part of the query has an *-expansion
that contains duplicate columns".  Something like:

HINT: <alias> contains multiple columns named <colname>

...would help a lot.  I don't feel strongly about it, I just thought
it was confusing.

...Robert

 
+1

This error would be clearer with something as simple as putting the ^ in the right place and extremely clear with the above "HINT".

--
--Dan

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inspection of row types in pl/pgsql and pl/sql
Next
From: Zdenek Kotala
Date:
Subject: Re: [PATCH] dtrace probes for memory manager