Re: [HACKERS] psql with "Function Type" in \df

2010-03-02 Thread Bruce Momjian
David Fetter wrote: > On Thu, Feb 25, 2010 at 07:20:58PM -0500, Bruce Momjian wrote: > > > > Did we ever get tab completion support for these backslash commands? > > Nope :/ > > Not sure if I'll be able to get to it this week, either. What is the TODO description then? -- Bruce Momjian

Re: [HACKERS] psql with "Function Type" in \df

2010-02-28 Thread David Fetter
On Thu, Feb 25, 2010 at 07:20:58PM -0500, Bruce Momjian wrote: > > Did we ever get tab completion support for these backslash commands? Nope :/ Not sure if I'll be able to get to it this week, either. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Y

Re: [HACKERS] psql with "Function Type" in \df

2010-02-25 Thread Bruce Momjian
Did we ever get tab completion support for these backslash commands? --- David Fetter wrote: > On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > > David Fetter wrote: > > > > > Is this any better? > > > > S

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Mon, Apr 27, 2009 at 01:31:11PM -0400, Alvaro Herrera wrote: > > Tab completion has never been perfect. I don't think beta is the > > best time to be improving it so much. I think a small patch that > > just adds "\dfa", "\dfw" and appropriate pattern completions (i.e. >

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 01:31:11PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > > > > It seems like rather a large change to be making in beta. Can > > > you make a small patch that fixes the immediate problem, and > > > leave

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > > It seems like rather a large change to be making in beta. Can you > > make a small patch that fixes the immediate problem, and leave the > > refactoring for 8.5? > > The hack I've come up with short of the refact

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > David Fetter writes: > > I have a handle on the problem, which is that the tab completion > > code assumes, wrongly, that it only needs to deal with fixed > > strings. It's actually been false for some time in the \div case, > > for exam

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Tom Lane
David Fetter writes: > I have a handle on the problem, which is that the tab completion code > assumes, wrongly, that it only needs to deal with fixed strings. It's > actually been false for some time in the \div case, for example. The > S option has shattered the fixed-string assumption. Check

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 10:39:33AM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > > > > It also seems like we're missing tab completion support for this. > > > > Oops. Working on that now. > > Any luck with this? I have

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > > It also seems like we're missing tab completion support for this. > > Oops. Working on that now. Any luck with this? -- Alvaro Herrerahttp://www.CommandPrompt.com/ Postgre

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera writes: > > Still, my original proposal was \df[antw][S+]. The extra brackets are > > obviously redundant, but if we're about providing cues, this is a good > > cue IMO. It allows the [S+] to match the other lines. > > I'm for that too. Bruce was complaining th

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Tom Lane
Alvaro Herrera writes: > Still, my original proposal was \df[antw][S+]. The extra brackets are > obviously redundant, but if we're about providing cues, this is a good > cue IMO. It allows the [S+] to match the other lines. I'm for that too. Bruce was complaining that it'd make the column wide

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Alvaro Herrera
Tom Lane wrote: > Bruce Momjian writes: > > If I can get someone else to say they prefer brackets over parentheses in > > \? I will make the change. Right now we have: > > >\df[antwS+] [PATTERN] list (only agg/normal/trigger/window) functions > > > With brackets it would be: > > >\df[

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Tom Lane
Bruce Momjian writes: > If I can get someone else to say they prefer brackets over parentheses in > \? I will make the change. Right now we have: >\df[antwS+] [PATTERN] list (only agg/normal/trigger/window) functions > With brackets it would be: >\df[antwS+] [PATTERN] list [only agg/

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Bruce Momjian
to...@tuxteam.de wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, Apr 22, 2009 at 08:32:20AM -0400, Bruce Momjian wrote: > > [...] > > > True, but the problem is that the brackets don't correspond [...] > > Yes, right. Still, square brackets seem (to me) to provide some visu

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Apr 22, 2009 at 08:32:20AM -0400, Bruce Momjian wrote: [...] > True, but the problem is that the brackets don't correspond [...] Yes, right. Still, square brackets seem (to me) to provide some visual cue. But I admit that this is already adv

Re: [HACKERS] psql with "Function Type" in \df

2009-04-22 Thread Bruce Momjian
to...@tuxteam.de wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tue, Apr 21, 2009 at 01:26:33PM -0400, Bruce Momjian wrote: > > [...] > > > I merged the entries into one line: > > > > \df[antwS+] [PATTERN] list (only agg/normal/trigger/window) functions > > > > I didn't f

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Apr 21, 2009 at 01:26:33PM -0400, Bruce Momjian wrote: [...] > I merged the entries into one line: > > \df[antwS+] [PATTERN] list (only agg/normal/trigger/window) functions > > I didn't feel I had room to do [][] like Alvaro suggeste

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Bruce Momjian
David Fetter wrote: > On Tue, Apr 21, 2009 at 01:04:44PM -0400, Alvaro Herrera wrote: > > David Fetter wrote: > > > > > Oh, and I forgot to send some error-handling and cleanup code per > > > Alvaro. Please find attached. :) > > > > Declarations before code please. > > Fixed patch attached. Ap

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Bruce Momjian
Alvaro Herrera wrote: > Kevin Grittner wrote: > > Bruce Momjian wrote: > > > > > \df[S+] [PATTERN] list functions > > > \df[antwS+] [PATTERN] list only agg/normal/trigger/window functions > > > > Shouldn't that second line have some curly braces? Like maybe: > > > > \df{antw}[S+] [PAT

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread David Fetter
On Tue, Apr 21, 2009 at 01:04:44PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > > Oh, and I forgot to send some error-handling and cleanup code per > > Alvaro. Please find attached. :) > > Declarations before code please. Fixed patch attached. Cheers, David. -- David Fetter http://

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Tom Lane
"Kevin Grittner" writes: > Bruce Momjian wrote: >> The problem is I don't see curly braces used anywhere in \? > I see it in 8.3: > : \d{t|i|s|v|S} [PATTERN] (add "+" for more detail) > :list tables/indexes/sequences/views/system tables Yeah. The only reason that \d[tisv] do

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Alvaro Herrera
David Fetter wrote: > Oh, and I forgot to send some error-handling and cleanup code per > Alvaro. Please find attached. :) Declarations before code please. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread David Fetter
On Tue, Apr 21, 2009 at 09:33:26AM -0700, David Fetter wrote: > On Tue, Apr 21, 2009 at 09:26:13AM -0700, Joshua D. Drake wrote: > > On Tue, 2009-04-21 at 12:19 -0400, Alvaro Herrera wrote: > > > > > I suggested this to Bruce over IM: > > > > > > \df[antw][S+] list [only agg/normal/trigger/wi

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Kevin Grittner
Bruce Momjian wrote: > The problem is I don't see curly braces used anywhere in \? I see it in 8.3: : \d{t|i|s|v|S} [PATTERN] (add "+" for more detail) :list tables/indexes/sequences/views/system tables and: : \pset NAME [VALUE] :set table output option :

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Kevin Grittner
Alvaro Herrera wrote: > \df[antw][S+] list [only agg/normal/trigger/window] functions > > (one line only, removing the second redundant line). This seems > clea[nr]er to me. Bruce says it would confuse users. That's clear to me, anyway (if you include PATTERN). I'd be fine with it or

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread David Fetter
On Tue, Apr 21, 2009 at 09:26:13AM -0700, Joshua D. Drake wrote: > On Tue, 2009-04-21 at 12:19 -0400, Alvaro Herrera wrote: > > > I suggested this to Bruce over IM: > > > > \df[antw][S+] list [only agg/normal/trigger/window] functions > > > > (one line only, removing the second redundant lin

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Bruce Momjian
Kevin Grittner wrote: > Bruce Momjian wrote: > > > \df[S+] [PATTERN] list functions > > \df[antwS+] [PATTERN] list only agg/normal/trigger/window functions > > Shouldn't that second line have some curly braces? Like maybe: > > \df{antw}[S+] [PATTERN] list only agg/normal/trigger/wind

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Joshua D. Drake
On Tue, 2009-04-21 at 12:19 -0400, Alvaro Herrera wrote: > I suggested this to Bruce over IM: > > \df[antw][S+] list [only agg/normal/trigger/window] functions > > (one line only, removing the second redundant line). This seems > clea[nr]er to me. Bruce says it would confuse users. But re

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Alvaro Herrera
Kevin Grittner wrote: > Bruce Momjian wrote: > > > \df[S+] [PATTERN] list functions > > \df[antwS+] [PATTERN] list only agg/normal/trigger/window functions > > Shouldn't that second line have some curly braces? Like maybe: > > \df{antw}[S+] [PATTERN] list only agg/normal/trigger/wind

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Kevin Grittner
Bruce Momjian wrote: > \df[S+] [PATTERN] list functions > \df[antwS+] [PATTERN] list only agg/normal/trigger/window functions Shouldn't that second line have some curly braces? Like maybe: \df{antw}[S+] [PATTERN] list only agg/normal/trigger/window functions Technically, it should

Re: [HACKERS] psql with "Function Type" in \df

2009-04-21 Thread Bruce Momjian
David Fetter wrote: > On Wed, Apr 15, 2009 at 08:54:10PM -0400, Alvaro Herrera wrote: > > David Fetter wrote: > > > > > > > I think it's good to have them translatable. As for using "aggregate" > > > > > instead of "agg" I don't think it's that great an idea. If you need > > > > > to > > > > >

Re: [HACKERS] psql with "Function Type" in \df

2009-04-17 Thread David Fetter
On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > > Is this any better? > > So what happens if I do \dfaQ? It should throw an error, yes? Interesting question. > > This help line: > > > + fprintf(output, _(" \\df[S+] [PATTERN] list functions. A

Re: [HACKERS] psql with "Function Type" in \df

2009-04-17 Thread David Fetter
On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > > Is this any better? > > So what happens if I do \dfaQ? It should throw an error, yes? > > This help line: > > > + fprintf(output, _(" \\df[S+] [PATTERN] list functions. Add a, n, > > t, w for

Re: [HACKERS] psql with "Function Type" in \df

2009-04-17 Thread Alvaro Herrera
David Fetter wrote: > Is this any better? So what happens if I do \dfaQ? It should throw an error, yes? This help line: > + fprintf(output, _(" \\df[S+] [PATTERN] list functions. Add a, n, > t, w for aggregate, normal, trigger, window\n")); needs shortening to below 80 chars (or m

Re: [HACKERS] psql with "Function Type" in \df

2009-04-15 Thread Alvaro Herrera
David Fetter wrote: > On Wed, Apr 15, 2009 at 08:54:10PM -0400, Alvaro Herrera wrote: > > The "translator: " comment needs to be in the line just above the > > string. > > Is this any better? Yeah, this one is good (as far as this very minor detail is concerned anyway) -- Alvaro Herrera

Re: [HACKERS] psql with "Function Type" in \df

2009-04-15 Thread David Fetter
On Wed, Apr 15, 2009 at 08:54:10PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > > > > I think it's good to have them translatable. As for using "aggregate" > > > > instead of "agg" I don't think it's that great an idea. If you need to > > > > notify translators that "agg" stands for "a

Re: [HACKERS] psql with "Function Type" in \df

2009-04-15 Thread Alvaro Herrera
David Fetter wrote: > > > I think it's good to have them translatable. As for using "aggregate" > > > instead of "agg" I don't think it's that great an idea. If you need to > > > notify translators that "agg" stands for "aggregate", add a > > > /* translator: */ comment. The "translator: " comm

Re: [HACKERS] psql with "Function Type" in \df

2009-04-15 Thread David Fetter
On Tue, Apr 14, 2009 at 03:18:06PM -0700, David Fetter wrote: > On Tue, Apr 14, 2009 at 02:52:32PM -0400, Alvaro Herrera wrote: > > Tom Lane wrote: > > > > > I had a second thought about that: presumably we should make the > > > function type names translatable. If we do that, it might be better

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread David Fetter
On Tue, Apr 14, 2009 at 02:52:32PM -0400, Alvaro Herrera wrote: > Tom Lane wrote: > > > I had a second thought about that: presumably we should make the > > function type names translatable. If we do that, it might be better > > to make the aggregate case be "aggregate" and take the width hit. >

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread David Fetter
On Tue, Apr 14, 2009 at 03:04:55PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > On Tue, Apr 14, 2009 at 02:52:32PM -0400, Alvaro Herrera wrote: > > > > I think it's good to have them translatable. As for using > > > "aggregate" instead of "agg" I don't think it's that great an > > > ide

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread Alvaro Herrera
David Fetter wrote: > On Tue, Apr 14, 2009 at 02:52:32PM -0400, Alvaro Herrera wrote: > > I think it's good to have them translatable. As for using > > "aggregate" instead of "agg" I don't think it's that great an idea. > > If you need to notify translators that "agg" stands for "aggregate", > >

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread David Fetter
On Tue, Apr 14, 2009 at 02:52:32PM -0400, Alvaro Herrera wrote: > Tom Lane wrote: > > > I had a second thought about that: presumably we should make the > > function type names translatable. If we do that, it might be > > better to make the aggregate case be "aggregate" and take the > > width hit

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread Alvaro Herrera
Tom Lane wrote: > I had a second thought about that: presumably we should make the > function type names translatable. If we do that, it might be better > to make the aggregate case be "aggregate" and take the width hit. > Otherwise translators are going to be puzzled when they come across > "agg

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread David Fetter
On Tue, Apr 14, 2009 at 12:35:21PM -0400, Tom Lane wrote: > David Fetter writes: > > On Mon, Apr 13, 2009 at 07:24:31PM -0400, Tom Lane wrote: > >> I'd go for something like > >> > >> Type > >> > >> window > >> agg > >> trigger > >> normal > >> > >> Or we could spell out "aggregate", but that m

Re: [HACKERS] psql with "Function Type" in \df

2009-04-14 Thread Tom Lane
David Fetter writes: > On Mon, Apr 13, 2009 at 07:24:31PM -0400, Tom Lane wrote: >> I'd go for something like >> >> Type >> >> window >> agg >> trigger >> normal >> >> Or we could spell out "aggregate", but that makes the column a >> couple of characters wider ... > Done. I had a second thoug

Re: [HACKERS] psql with "Function Type" in \df

2009-04-13 Thread David Fetter
On Mon, Apr 13, 2009 at 07:24:31PM -0400, Tom Lane wrote: > David Fetter writes: > > Here's a patch that adds a "Function Type" column to \df while > > removing the now-redundant \da. > > Removing \da altogether was nowhere in the consensus, or even in the > discussion AFAIR. It's back. > Also,

Re: [HACKERS] psql with "Function Type" in \df

2009-04-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Here's a patch that adds a "Function Type" column to \df while > removing the now-redundant \da. 1. How does it make it redundant - is there a way to view all aggregates with \df now? 2. Even if the above is satisfied, I think we need a litt

Re: [HACKERS] psql with "Function Type" in \df

2009-04-13 Thread Tom Lane
David Fetter writes: > Here's a patch that adds a "Function Type" column to \df while > removing the now-redundant \da. Removing \da altogether was nowhere in the consensus, or even in the discussion AFAIR. Also, what is the point of using single-letter type codes when you've made the column hea

[HACKERS] psql with "Function Type" in \df

2009-04-13 Thread David Fetter
Folks, Here's a patch that adds a "Function Type" column to \df while removing the now-redundant \da. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donat