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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause
Дата
Msg-id CAKFQuwbMZNbFpipHhKWDgwy1rjV+T_JhUmGCbKAORu1cuxR8Qw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sunday, October 17, 2021, Tom Lane <tgl@sss.pgh.pa.us> wrote:

There might be an opportunity here to improve the error message's hint:

regression=# SELECT CTID
regression-# FROM tmp1
regression-# INNER JOIN tmp2 ON tmp1.id = tmp2.id;
ERROR:  column "ctid" does not exist
LINE 1: SELECT CTID
               ^
HINT:  There is a column named "ctid" in table "tmp1", but it cannot be referenced from this part of the query.

"cannot be referenced" is probably a shade misleading, given the
availability of the qualified-name alternative.


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.

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause