Thread: Show line numbers in SQL Editor?
<div class="Section1"><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">Is there a way to get the pgAdmin SQL Editor to show line numbers? </span></font><p class="MsoNormal"><fontface="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">Or, failing that, to get the cursor to go to a specified line number? </span></font><p class="MsoNormal"><fontface="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">Since error messages sometimes reference line numbers, this would be a big help.</span></font><p class="MsoNormal"><fontface="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana"> </span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">~ TIA</span></font><p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size:10.0pt; font-family:Verdana">~ Ken</span></font></div>
Le 13/02/2010 22:43, Ken Winter a écrit : > Is there a way to get the pgAdmin SQL Editor to show line numbers? > This has been asked yesterday. See http://archives.postgresql.org/message-id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com for details. Strangely, my answer still isn't there. Anyways, I worked on it today. I have a patch that I'll apply in a few days if no one objects before. > Or, failing that, to get the cursor to go to a specified line number? > Nope. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Sat, Feb 13, 2010 at 9:55 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote: > Le 13/02/2010 22:43, Ken Winter a écrit : >> Is there a way to get the pgAdmin SQL Editor to show line numbers? >> > > This has been asked yesterday. See > http://archives.postgresql.org/message-id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com > for details. > > Strangely, my answer still isn't there. Anyways, I worked on it today. I > have a patch that I'll apply in a few days if no one objects before. Depends how you propose to do it. We used to have line numbers down the left, and some people found them annoying and distracting, so we got rid of them in favour of the indicator in the status bar. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Guillaume ~ Thanks for your quick response. Sorry I missed the earlier message - I just joined the list today, and I forgot to search the archive! I'll look forward to your improvement. I *did* just discover that there is at least a line number indicator in the status bar at the bottom of the screen. This is better than nothing. But numbered lines (with a user option to show/hide them) would be much better, at least for this user. ~ Ken > -----Original Message----- > From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support- > owner@postgresql.org] On Behalf Of Guillaume Lelarge > Sent: Saturday, February 13, 2010 4:56 PM > To: Ken Winter > Cc: pgAdmin Support List > Subject: Re: [pgadmin-support] Show line numbers in SQL Editor? > > Le 13/02/2010 22:43, Ken Winter a écrit : > > Is there a way to get the pgAdmin SQL Editor to show line numbers? > > > > This has been asked yesterday. See > http://archives.postgresql.org/message- > id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com > for details. > > Strangely, my answer still isn't there. Anyways, I worked on it today. I > have a patch that I'll apply in a few days if no one objects before. > > > Or, failing that, to get the cursor to go to a specified line number? > > > > Nope. > > > -- > Guillaume. > http://www.postgresqlfr.org > http://dalibo.com > > -- > Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-support
Le 13/02/2010 23:00, Dave Page a écrit : > On Sat, Feb 13, 2010 at 9:55 PM, Guillaume Lelarge > <guillaume@lelarge.info> wrote: >> Le 13/02/2010 22:43, Ken Winter a écrit : >>> Is there a way to get the pgAdmin SQL Editor to show line numbers? >>> >> >> This has been asked yesterday. See >> http://archives.postgresql.org/message-id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com >> for details. >> >> Strangely, my answer still isn't there. Anyways, I worked on it today. I >> have a patch that I'll apply in a few days if no one objects before. > > Depends how you propose to do it. We used to have line numbers down > the left, and some people found them annoying and distracting, so we > got rid of them in favour of the indicator in the status bar. > I use a margin on the left to show them. People can show/hide them, there's an option in the view menu (which is disabled by default, so we keep the same behaviour as now). I don't understand why my mail doesn't appear yet. I didn't get any message for the moderation queue. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Le 13/02/2010 23:17, Guillaume Lelarge a écrit : > Le 13/02/2010 23:00, Dave Page a écrit : >> On Sat, Feb 13, 2010 at 9:55 PM, Guillaume Lelarge >> <guillaume@lelarge.info> wrote: >>> Le 13/02/2010 22:43, Ken Winter a écrit : >>>> Is there a way to get the pgAdmin SQL Editor to show line numbers? >>>> >>> >>> This has been asked yesterday. See >>> http://archives.postgresql.org/message-id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com >>> for details. >>> >>> Strangely, my answer still isn't there. Anyways, I worked on it today. I >>> have a patch that I'll apply in a few days if no one objects before. >> >> Depends how you propose to do it. We used to have line numbers down >> the left, and some people found them annoying and distracting, so we >> got rid of them in favour of the indicator in the status bar. >> > > I use a margin on the left to show them. People can show/hide them, > there's an option in the view menu (which is disabled by default, so we > keep the same behaviour as now). > > I don't understand why my mail doesn't appear yet. I didn't get any > message for the moderation queue. > By the way, if you wanna take a look at it, you can see what I did in the ticket: http://code.pgadmin.org/trac/ticket/138 Screenshots: http://code.pgadmin.org/trac/attachment/ticket/138/linenumber.png http://code.pgadmin.org/trac/attachment/ticket/138/linenumber2.png Patch: http://code.pgadmin.org/trac/attachment/ticket/138/ticket138_v1.patch -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
As a newbie, let me just say that I looked at Guillaume's screen prints on TRAC, and they're exactly what I hoped for. ~ Ken > -----Original Message----- > From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support- > owner@postgresql.org] On Behalf Of Guillaume Lelarge > Sent: Saturday, February 13, 2010 5:25 PM > To: Dave Page > Cc: Ken Winter; pgAdmin Support List > Subject: Re: [pgadmin-support] Show line numbers in SQL Editor? > > Le 13/02/2010 23:17, Guillaume Lelarge a écrit : > > Le 13/02/2010 23:00, Dave Page a écrit : > >> On Sat, Feb 13, 2010 at 9:55 PM, Guillaume Lelarge > >> <guillaume@lelarge.info> wrote: > >>> Le 13/02/2010 22:43, Ken Winter a écrit : > >>>> Is there a way to get the pgAdmin SQL Editor to show line numbers? > >>>> > >>> > >>> This has been asked yesterday. See > >>> http://archives.postgresql.org/message- > id/4b74a338.0e0bca0a.7758.ffffac84@mx.google.com > >>> for details. > >>> > >>> Strangely, my answer still isn't there. Anyways, I worked on it today. > I > >>> have a patch that I'll apply in a few days if no one objects before. > >> > >> Depends how you propose to do it. We used to have line numbers down > >> the left, and some people found them annoying and distracting, so we > >> got rid of them in favour of the indicator in the status bar. > >> > > > > I use a margin on the left to show them. People can show/hide them, > > there's an option in the view menu (which is disabled by default, so we > > keep the same behaviour as now). > > > > I don't understand why my mail doesn't appear yet. I didn't get any > > message for the moderation queue. > > > > By the way, if you wanna take a look at it, you can see what I did in > the ticket: > http://code.pgadmin.org/trac/ticket/138 > > Screenshots: > http://code.pgadmin.org/trac/attachment/ticket/138/linenumber.png > http://code.pgadmin.org/trac/attachment/ticket/138/linenumber2.png > > Patch: > http://code.pgadmin.org/trac/attachment/ticket/138/ticket138_v1.patch > > > -- > Guillaume. > http://www.postgresqlfr.org > http://dalibo.com > > -- > Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-support
On Sat, Feb 13, 2010 at 10:25 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote: > > By the way, if you wanna take a look at it, you can see what I did in > the ticket: > http://code.pgadmin.org/trac/ticket/138 > > Screenshots: > http://code.pgadmin.org/trac/attachment/ticket/138/linenumber.png > http://code.pgadmin.org/trac/attachment/ticket/138/linenumber2.png > > Patch: > http://code.pgadmin.org/trac/attachment/ticket/138/ticket138_v1.patch What happens with more than 10K lines in a file (yes, we have seen complaints about that!). What about the line markers? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
On 13/02/2010 22:17, Guillaume Lelarge wrote: > I don't understand why my mail doesn't appear yet. I didn't get any > message for the moderation queue. I got your email with the screenshots and patch - mind you, it might have been the direct email rather than via the list, if you did a "reply all". I've zapped the mail now so can't check I'm afraid. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
Le 14/02/2010 11:05, Dave Page a écrit : > On Sat, Feb 13, 2010 at 10:25 PM, Guillaume Lelarge > <guillaume@lelarge.info> wrote: >> >> By the way, if you wanna take a look at it, you can see what I did in >> the ticket: >> http://code.pgadmin.org/trac/ticket/138 >> >> Screenshots: >> http://code.pgadmin.org/trac/attachment/ticket/138/linenumber.png >> http://code.pgadmin.org/trac/attachment/ticket/138/linenumber2.png >> >> Patch: >> http://code.pgadmin.org/trac/attachment/ticket/138/ticket138_v1.patch > > What happens with more than 10K lines in a file (yes, we have seen > complaints about that!). I tried with a 605k lines file, and it worked great on my laptop. What was the complaint about? size of the margin? slow rendering? > What about the line markers? What do you mean? -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Le 14/02/2010 12:46, Raymond O'Donnell a écrit : > On 13/02/2010 22:17, Guillaume Lelarge wrote: > >> I don't understand why my mail doesn't appear yet. I didn't get any >> message for the moderation queue. > > I got your email with the screenshots and patch - mind you, it might > have been the direct email rather than via the list, if you did a "reply > all". I've zapped the mail now so can't check I'm afraid. > No, I sent it to you, Danny and the list. Not really a big issue as it is also available on trac. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
On Sun, Feb 14, 2010 at 1:12 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote: > Le 14/02/2010 11:05, Dave Page a écrit : >> What happens with more than 10K lines in a file (yes, we have seen >> complaints about that!). > > I tried with a 605k lines file, and it worked great on my laptop. > > What was the complaint about? size of the margin? slow rendering? The line numbers overflow the margin, because it doesn't auto-size to accomodate the width. >> What about the line markers? > > What do you mean? We sometimes display error marker in the margin. A similar issue to the above is that they may be rendered on top of the numbers which looks really messy. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Le 14/02/2010 15:29, Dave Page a écrit : > On Sun, Feb 14, 2010 at 1:12 PM, Guillaume Lelarge > <guillaume@lelarge.info> wrote: >> Le 14/02/2010 11:05, Dave Page a écrit : >>> What happens with more than 10K lines in a file (yes, we have seen >>> complaints about that!). >> >> I tried with a 605k lines file, and it worked great on my laptop. >> >> What was the complaint about? size of the margin? slow rendering? > > The line numbers overflow the margin, because it doesn't auto-size to > accomodate the width. > The size of the margin is calculated at each new line. So it auto-sizes. >>> What about the line markers? >> >> What do you mean? > > We sometimes display error marker in the margin. A similar issue to > the above is that they may be rendered on top of the numbers which > looks really messy. > Oh OK, I didn't remember this marker. I just tried and it worked. They don't render on each other. The error marker appears after the line number. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Cool. I guess stc has improved since we last tried this. On 2/14/10, Guillaume Lelarge <guillaume@lelarge.info> wrote: > Le 14/02/2010 15:29, Dave Page a écrit : >> On Sun, Feb 14, 2010 at 1:12 PM, Guillaume Lelarge >> <guillaume@lelarge.info> wrote: >>> Le 14/02/2010 11:05, Dave Page a écrit : >>>> What happens with more than 10K lines in a file (yes, we have seen >>>> complaints about that!). >>> >>> I tried with a 605k lines file, and it worked great on my laptop. >>> >>> What was the complaint about? size of the margin? slow rendering? >> >> The line numbers overflow the margin, because it doesn't auto-size to >> accomodate the width. >> > > The size of the margin is calculated at each new line. So it auto-sizes. > >>>> What about the line markers? >>> >>> What do you mean? >> >> We sometimes display error marker in the margin. A similar issue to >> the above is that they may be rendered on top of the numbers which >> looks really messy. >> > > Oh OK, I didn't remember this marker. I just tried and it worked. They > don't render on each other. The error marker appears after the line number. > > > -- > Guillaume. > http://www.postgresqlfr.org > http://dalibo.com > -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Le 14/02/2010 16:43, Dave Page a écrit : > Cool. I guess stc has improved since we last tried this. > I commited my patch. Thanks. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com