Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "lxndrkrlv(at)gmail(dot)com" <lxndrkrlv(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause
Date: 2021-10-17 14:57:16
Message-ID: 1411094.1634482636@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> I was actually wondering why the error wasn’t an ambiguous column name
> error. For a pure select query we already allow duplicate column names in
> the result.

To get an "ambiguous column name" error, there'd need to be multiple
*accessible* names, not multiple inaccessible ones. Although I concede
your point that maybe we could adjust the "does not exist" phraseology
too. Maybe something like "column foo is not available"?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2021-10-17 15:12:05 Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Previous Message David G. Johnston 2021-10-17 14:50:24 Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause