Re: CTE containing ambiguous columns

From: Dan Colish <dcolish(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: CTE containing ambiguous columns
Date: 2009-11-13 21:37:31
Message-ID: 7c21e7d30911131337q167eae45j2cc75b4cecdb70af@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-13 21:37:39 Re: Inspection of row types in pl/pgsql and pl/sql
Previous Message Alvaro Herrera 2009-11-13 21:34:21 Re: [PATCH] dtrace probes for memory manager