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

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: client side syntax error localisation for psql (v1)
Дата
Msg-id Pine.LNX.4.58.0403111821140.12205@sablons.cri.ensmp.fr
обсуждение исходный текст
Ответ на Re: client side syntax error localisation for psql (v1)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: client side syntax error localisation for psql (v1)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: client side syntax error localisation for psql (v1)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Dear Tom,

> >> The "on line N" bit seems just noise to me.
> > It depends.
>
> I can see that it would be useful in a very large query.  Perhaps
> include it only when the query has more than N lines, for some N
> like three to five or so?

Yes, I can do that.

> Another possibility is to keep the cursor as just "^", and bury the
> line info in the query extract.  For instance:

Well, I want to preserve space for the query extract, that's where the
context information is! If I put more information there, I'll have to
reduce the extract length.

Moreover the cursor line information content is small, so it seems better
to put the line information there.

> (So "LINE n" would never say "LINE 1", only larger line numbers.)

I agree that LINE 1 looks pretty useless, especially if there is only
one line;-)

> I think this wouldn't be terribly complex to implement, and it would
> make things look fairly nice for both short and long queries.

There is also an alignment issue here, as depending on the number of
figures, the cursor line would have to be fixed accordingly.

> One last point: it seems a bit odd to use QUERY: as the prefix for both
> the query extract and the cursor line.  I don't have a suggestion what
> to use instead, offhand.

I agree, but couldn't think of a better choice either.

There is also a localisation issue here, as the translation of both lines
must match so that the alignment is kept. I thought that if it is the very
same word, the translation should be the same.

Thanks for your comments and ideas, I'll submit a v3 on (my) tomorrow.

Have a nice day,

-- 
Fabien Coelho - coelho@cri.ensmp.fr


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: client side syntax error localisation for psql (v1)
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: client side syntax error localisation for psql (v1)