From: | Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> |
---|---|
To: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: add line number as prompt option to psql |
Date: | 2014-07-11 12:40:14 |
Message-ID: | CAM2+6=UXN9wRFSFnZpov7LZzqzssZDoG=U=wLXx1Qu0hH+uEuQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Fri, Jul 11, 2014 at 3:13 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
psql-line-number_v5_jeevan.patch | text/x-diff | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2014-07-11 12:55:56 | Re: Allowing NOT IN to use ANTI joins |
Previous Message | Magnus Hagander | 2014-07-11 11:10:06 | Re: Missing autocomplete for CREATE DATABASE |