Re: .psqlrc version dependence (was Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH)

2011-10-15 Thread Bruce Momjian
Tom Lane wrote: > Peter Eisentraut writes: > > Contrary to what the subject suggests, I think the main reason people > > wanted this feature was to be able to set the linestyle to unicode > > without getting a warning from older releases about unknown linestyle or > > something. But in a few year

.psqlrc version dependence (was Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH)

2011-10-15 Thread Tom Lane
Peter Eisentraut writes: > Contrary to what the subject suggests, I think the main reason people > wanted this feature was to be able to set the linestyle to unicode > without getting a warning from older releases about unknown linestyle or > something. But in a few years, they'll have to > maint

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-15 Thread Bruce Momjian
Andrew Dunstan wrote: > > > On 10/15/2011 09:37 AM, Peter Eisentraut wrote: > > On tor, 2011-10-13 at 11:31 -0400, Bruce Momjian wrote: > >> The attached patch changes this to use the _major_ version number for > >> psql rc files. Does this have to be backward-compatible? Should I > >> check fo

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-15 Thread Bruce Momjian
Peter Eisentraut wrote: > On tor, 2011-10-13 at 11:31 -0400, Bruce Momjian wrote: > > The attached patch changes this to use the _major_ version number for > > psql rc files. Does this have to be backward-compatible? Should I > > check for minor and major matches? That is going to be confusing t

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-15 Thread Andrew Dunstan
On 10/15/2011 09:37 AM, Peter Eisentraut wrote: On tor, 2011-10-13 at 11:31 -0400, Bruce Momjian wrote: The attached patch changes this to use the _major_ version number for psql rc files. Does this have to be backward-compatible? Should I check for minor and major matches? That is going to

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-15 Thread Peter Eisentraut
On tor, 2011-10-13 at 11:31 -0400, Bruce Momjian wrote: > The attached patch changes this to use the _major_ version number for > psql rc files. Does this have to be backward-compatible? Should I > check for minor and major matches? That is going to be confusing to > document. Contrary to what

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Oops, I see a problem. Right now, our first major release has no zero, > > e.g. 9.2, while our minors have a third digit, 9.2.5. The problem is > > that with this patch it is confusing to have a psql config file that > > matches 9.2.0, but not 9.2.5, b

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Tom Lane
Bruce Momjian writes: > Oops, I see a problem. Right now, our first major release has no zero, > e.g. 9.2, while our minors have a third digit, 9.2.5. The problem is > that with this patch it is confusing to have a psql config file that > matches 9.2.0, but not 9.2.5, because you can't write 9.2

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Bruce Momjian
Alvaro Herrera wrote: > > Excerpts from Robert Haas's message of vie oct 14 09:36:47 -0300 2011: > > > > On Thu, Oct 13, 2011 at 11:31 AM, Bruce Momjian wrote: > > > Alvaro Herrera wrote: > > > >> Oh, true, we have that, though it's not very usable because you have to > > >> rename the file fro

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Alvaro Herrera
Excerpts from Robert Haas's message of vie oct 14 09:36:47 -0300 2011: > > On Thu, Oct 13, 2011 at 11:31 AM, Bruce Momjian wrote: > > Alvaro Herrera wrote: > >> Oh, true, we have that, though it's not very usable because you have to > >> rename the file from .psqlrc-9.0.3 to .psqlrc-9.0.4 when

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Bruce Momjian
Robert Haas wrote: > On Thu, Oct 13, 2011 at 11:31 AM, Bruce Momjian wrote: > > Alvaro Herrera wrote: > >> Excerpts from Tom Lane's message of mi? may 25 16:07:55 -0400 2011: > >> > Alvaro Herrera writes: > >> > > Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: > >> > >> Right

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-14 Thread Robert Haas
On Thu, Oct 13, 2011 at 11:31 AM, Bruce Momjian wrote: > Alvaro Herrera wrote: >> Excerpts from Tom Lane's message of mié may 25 16:07:55 -0400 2011: >> > Alvaro Herrera writes: >> > > Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: >> > >> Right.  It would also increase the c

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-10-13 Thread Bruce Momjian
Alvaro Herrera wrote: > Excerpts from Tom Lane's message of mi?? may 25 16:07:55 -0400 2011: > > Alvaro Herrera writes: > > > Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: > > >> Right. It would also increase the cognitive load on the user to have > > >> to remember the comm

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-07-18 Thread Peter Eisentraut
Here's a patch to fix what has been discussed: * Change EDITOR_LINENUMBER_SWITCH to environment variable. * I also changed "switch" to "arg" because "switch" is a bit of a sloppy term. * So the environment variable is called PSQL_EDITOR_LINENUMBER_ARG. * Set

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-26 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié may 25 16:07:55 -0400 2011: > Alvaro Herrera writes: > > Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: > >> Right. It would also increase the cognitive load on the user to have > >> to remember the command-line go-to-line-number switch

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-25 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: >> Right. It would also increase the cognitive load on the user to have >> to remember the command-line go-to-line-number switch for his editor. >> So I don't particularly want to redesign this feature.

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-25 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar may 24 17:11:17 -0400 2011: > Right. It would also increase the cognitive load on the user to have > to remember the command-line go-to-line-number switch for his editor. > So I don't particularly want to redesign this feature. However, I can > see the pos

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Robert Haas
On Tue, May 24, 2011 at 5:35 PM, Tom Lane wrote: > Robert Haas writes: >> On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut wrote: >>> I noticed the 9.1 release notes claim that the new >>> EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is >>> actually a psql variable. >>>

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Tom Lane
Robert Haas writes: > On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut wrote: >> I noticed the 9.1 release notes claim that the new >> EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is >> actually a psql variable. >> This is perhaps sort of a Freudian slip. > It's probabl

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Tom Lane
Robert Haas writes: > On Tue, May 24, 2011 at 4:36 PM, Peter Eisentraut wrote: >>> That's an intriguing possibility. But part of the point of the >>> original feature was to be able to say: >>> >>> \ef somefunc 10 >>> >>> ...and end up on line 10 of somefunc, perhaps in response to an error >>

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Robert Haas
On Tue, May 24, 2011 at 4:36 PM, Peter Eisentraut wrote: >> That's an intriguing possibility.  But part of the point of the >> original feature was to be able to say: >> >> \ef somefunc 10 >> >> ...and end up on line 10 of somefunc, perhaps in response to an error >> message complaining about that

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Peter Eisentraut
On sön, 2011-05-22 at 06:30 +0200, Pavel Stehule wrote: > A idea with other options are > interesting. More usable can be store these option inside psql > variable (be consistent with current state). Maybe in > EDITOR_OPTIONS ? There isn't really a need for that, since if you want to pass options

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-24 Thread Peter Eisentraut
On lör, 2011-05-21 at 20:39 -0400, Robert Haas wrote: > On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut wrote: > > I noticed the 9.1 release notes claim that the new > > EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is > > actually a psql variable. > It's probably the re

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-21 Thread Pavel Stehule
2011/5/21 Peter Eisentraut : > I noticed the 9.1 release notes claim that the new > EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is > actually a psql variable. > > This is perhaps sort of a Freudian slip.  Since the editor itself is > configured using an environment variabl

Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-21 Thread Robert Haas
On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut wrote: > I noticed the 9.1 release notes claim that the new > EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is > actually a psql variable. > > This is perhaps sort of a Freudian slip.  Since the editor itself is > configured

[HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-05-21 Thread Peter Eisentraut
I noticed the 9.1 release notes claim that the new EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is actually a psql variable. This is perhaps sort of a Freudian slip. Since the editor itself is configured using an environment variable, shouldn't any configuration about the