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 da...@fetter.org http://fetter.org/ Phone: +1 415 235 3778

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? So what

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/ PostgreSQL

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 a handle on

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

2009-04-27 Thread Tom Lane
David Fetter da...@fetter.org 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

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 da...@fetter.org 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,

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 refactor is to

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 the

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. it lists

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 feel I had room

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

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 visual cue.

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

2009-04-22 Thread Tom Lane
Bruce Momjian br...@momjian.us 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]

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

2009-04-22 Thread Alvaro Herrera
Tom Lane wrote: Bruce Momjian br...@momjian.us 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:

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

2009-04-22 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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

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

2009-04-22 Thread Bruce Momjian
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com 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

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 notify translators that agg

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

2009-04-21 Thread Kevin Grittner
Bruce Momjian br...@momjian.us 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

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

2009-04-21 Thread Alvaro Herrera
Kevin Grittner wrote: Bruce Momjian br...@momjian.us 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

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 really,

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

2009-04-21 Thread Bruce Momjian
Kevin Grittner wrote: Bruce Momjian br...@momjian.us 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

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

2009-04-21 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com 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).

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

2009-04-21 Thread Kevin Grittner
Bruce Momjian br...@momjian.us 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

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 line). This

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/window]

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 Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Bruce Momjian br...@momjian.us 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.

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

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

2009-04-21 Thread Bruce Momjian
Alvaro Herrera wrote: Kevin Grittner wrote: Bruce Momjian br...@momjian.us 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+]

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. Applied. --

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 suggested.

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 maybe

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 aggregate,

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. Add a, n,

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 to make

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: comment needs to be in

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 aggregate, add a

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-14 Thread Tom Lane
David Fetter da...@fetter.org 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 thought about

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 da...@fetter.org 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

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 as a

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
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, add a /*

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 idea. If you need

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. Otherwise

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

2009-04-13 Thread Tom Lane
David Fetter da...@fetter.org 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

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 little

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 da...@fetter.org 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.