| От | Tom Lane |
|---|---|
| Тема | Re: client side syntax error localisation for psql (v1) |
| Дата | |
| Msg-id | 8948.1079102303@sss.pgh.pa.us обсуждение |
| Ответ на | Re: client side syntax error localisation for psql (v1) (Fabien COELHO <coelho@cri.ensmp.fr>) |
| Список | pgsql-hackers |
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> As a compromise, I can suggest the following:
> LINE 4: WHERE id=123 AND name LIKE 'calvin' GROP BY name...
> ^
That works for me. I don't mind it saying LINE 1: in the one-line case.
>> It's not going to add more than about one strlen() call to what you need
>> to do.
> I cannot strlen an integer value;-) I have to convert to a string, or
> deal directly with the line number.
Well, what I'm imagining is that you sprintf("LINE %d") and then strlen
that in the process of constructing the first line, and later add that
length to the offset you need in the second line.
Tatsuo's complaints about characters that span more than one position
are a much nastier problem, in any case :-(. Can we cope?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера