Re: client side syntax error localisation for psql (v1)

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Fernando Nasser
Дата:
Сообщение: Re: Log rotation
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: The Name Game: postgresql.net vs. pgfoundry.org