Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be adifferent error no

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be adifferent error no
Дата
Msg-id CAKFQuwacR75ao3R4s7hOor8VgL5nL2VA5KRBDU+WgVvFSvhzfw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be adifferent error no  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be a different error no
Список pgsql-bugs
On Mon, Oct 30, 2017 at 6:35 PM, David Rowley <david.rowley@2ndquadrant.com> wrote:
On 31 October 2017 at 13:36,  <stefan.hanenberg@googlemail.com> wrote:
> The following SQL statement leads to an error 42601 (syntax error), although
> the error is not a syntax error.

> We are currently running automated tests on hundreds of thousands SQL in
> order to check, what kind of errors they contain. It is really problematic
> for us that the error is a 42601 error, although it seems rather as if it is
> a type error.

then a syntax error seems a bit more reasonable.

Someone familiar with the SQL standard would need to confirm that our choice in this case is not governed by the standard before I'd consider changing it.

That said, I can make an argument for 42804 (datatype_mismatch) - which still has a syntax error classification - since the implicit row-types from the two input relations do not match each other.

The example error would read:

UNION types (int, int) and (int, int, int) cannot be matched

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be adifferent error no
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14883: Syntax SQL error (42601), but should be a different error no