Include 3 previous tokens in syntax error message

Поиск
Список
Период
Сортировка
От Andrus
Тема Include 3 previous tokens in syntax error message
Дата
Msg-id ed636acc-f4c4-7b50-3d59-fc727068e4c7@hot.ee
обсуждение исходный текст
Ответы Re: Include 3 previous tokens in syntax error message
Список pgsql-general

Hi!

Postgres returns unreadable syntax error messageges like

Syntax error at or near ')'

If there are many ) characters in query, it is not possible to find the palce where error occurs.

STATEMENT_POSITION is difficult to use since drivers perform parameter replacements which makes this different from source position.

How to fix this so that 3 last tokens are returned in message like

Syntax error at or near ' i > )' Andrus.

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

Предыдущее
От: Ahmet Demir
Дата:
Сообщение: Re: alter system command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Include 3 previous tokens in syntax error message