Re: add line number as prompt option to psql

Поиск
Список
Период
Сортировка
От Jeevan Chalke
Тема Re: add line number as prompt option to psql
Дата
Msg-id CAM2+6=UXN9wRFSFnZpov7LZzqzssZDoG=U=wLXx1Qu0hH+uEuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: add line number as prompt option to psql  (Sawada Masahiko <sawada.mshk@gmail.com>)
Ответы Re: add line number as prompt option to psql  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi,


On Fri, Jul 11, 2014 at 3:13 PM, Sawada Masahiko <sawada.mshk@gmail.com> wrote:
>
>

To my understating cleanly, you means that line number is not changed
when newline has reached to INT_MAX, is incorrect?

As per my thinking yes.
 
And the line number should be switched to 1 when line number has
reached to INT_MAX?

Yes, when it goes beyond INT_MAX, wrap around to 1.

BTW, I wonder, can't we simply use unsigned int instead?

Also, what is the behaviour on LINE n, in error message in case of such wrap-around?
 

>
> Or much better, simply get rid of newline, and use cur_line itself, will
> this work well for you?

this is better.  I will change code to this.
Thanks.
I will fix it.


Meanwhile I have tried this. Attached patch to have your suggestion on that.

Thanks

--
Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Missing autocomplete for CREATE DATABASE
Следующее
От: David Rowley
Дата:
Сообщение: Re: Allowing NOT IN to use ANTI joins