Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-21 Thread Martin Pihlak
Bruce Momjian wrote: Bruce Momjian wrote: I know we don't like the current behavior, but I think we need to make them consistent first for easy testing and so when we change it, it will remain consistent. I will work on a consensus patch soon for the new behavior. The \dXU *.* commands

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-21 Thread Gregory Stark
Martin Pihlak martin.pih...@gmail.com writes: Bruce Momjian wrote: Bruce Momjian wrote: I know we don't like the current behavior, but I think we need to make them consistent first for easy testing and so when we change it, it will remain consistent. I will work on a consensus patch soon

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Bruce Momjian
Robert Haas wrote: Here is what I hope is a consensus patch. It adds 'A' to show all objects, including system ones. It turns out that this is how 'S' works now in CVS, but 'S' is unclear because it suggests just system objects; 'A' for show 'all' objects seems clearer. I think it's

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Alvaro Herrera
Bruce Momjian escribió: In thinking last night, I am now wondering if a letter is really the right symbol for this. We already have letter flags which control object type selection, but the system table addition is kind of independent of those flags, like '+' now. I am thinking maybe '' is

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 In thinking last night, I am now wondering if a letter is really the right symbol for this. We already have letter flags which control object type selection, but the system table addition is kind of independent of those flags, like '+'

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Dimitri Fontaine
Le mardi 20 janvier 2009, Bruce Momjian a écrit : Robert Haas wrote: Here is what I hope is a consensus patch. It adds 'A' to show all objects, including system ones. It turns out that this is how 'S' works now in CVS, but 'S' is unclear because it suggests just system objects; 'A'

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: In thinking last night, I am now wondering if a letter is really the right symbol for this. We already have letter flags which control object type selection, but the system table addition is kind of independent of those flags, like '+' now. I

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian escribi?: In thinking last night, I am now wondering if a letter is really the right symbol for this. We already have letter flags which control object type selection, but the system table addition is kind of independent of those flags, like '+' now.

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Bruce Momjian
Greg Sabino Mullane wrote: [ There is text before PGP section. ] -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 In thinking last night, I am now wondering if a letter is really the right symbol for this. We already have letter flags which control object type selection, but the

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-20 Thread Bruce Momjian
Dimitri Fontaine wrote: -- Start of PGP signed section. Le mardi 20 janvier 2009, Bruce Momjian a ?crit?: Robert Haas wrote: Here is what I hope is a consensus patch. It adds 'A' to show all objects, including system ones. It turns out that this is how 'S' works now in CVS, but

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-19 Thread Bruce Momjian
Gregory Stark wrote: The behaviour of \dt in the face of tables which shadow system tables is actually even stranger: postgres=# create table pg_proc (t text); CREATE TABLE postgres=# commit; COMMIT postgres=# \dt pg_proc No matching relations found. And I

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-19 Thread Bruce Momjian
Bruce Momjian wrote: I know we don't like the current behavior, but I think we need to make them consistent first for easy testing and so when we change it, it will remain consistent. I will work on a consensus patch soon for the new behavior. Here is what I hope is a consensus patch. It

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-19 Thread Robert Haas
Here is what I hope is a consensus patch. It adds 'A' to show all objects, including system ones. It turns out that this is how 'S' works now in CVS, but 'S' is unclear because it suggests just system objects; 'A' for show 'all' objects seems clearer. I think it's probably fine for S to

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Gregory Stark
Tom Lane t...@sss.pgh.pa.us writes: Well, as I said before, I'm not averse to having the default behavior *with no pattern* to be that we omit system objects --- and I think we could make that apply across the board. What I'm saying is that when you give a pattern it should not matter

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Gregory Stark st...@enterprisedb.com writes: So it seems to me that we made \df consistent with \dt when in fact what we really wanted is for it to be consistent with \d. I hadn't actually realized that the behaviour for \d was so different from \dt myself. Yeah, given that the battle cry for

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread David E. Wheeler
On Jan 16, 2009, at 8:36 AM, Tom Lane wrote: One issue here is that plain \d gets less useful because it'll now include system catalogs. We could add the additional rule that the above statements apply only when a pattern is specified, and without a pattern you get just user stuff (so omitting

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Joshua D. Drake
On Fri, 2009-01-16 at 09:14 -0800, David E. Wheeler wrote: On Jan 16, 2009, at 8:36 AM, Tom Lane wrote: One issue here is that plain \d gets less useful because it'll now include system catalogs. We could add the additional rule that the above statements apply only when a pattern is

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: On Jan 16, 2009, at 8:36 AM, Tom Lane wrote: Comments? Does this cover all the cases? So would \df then be equivalent to \dU? Or am I misunderstanding something? You mean \dfU? Yes, if there's no pattern. regards, tom

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 One issue here is that plain \d gets less useful because it'll now include system catalogs. Are you kidding me? No way. That's a recipe for making all our users unhappy with us. * \dfU will restrict the printout to non-system functions

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread David E. Wheeler
On Jan 16, 2009, at 9:35 AM, Tom Lane wrote: So would \df then be equivalent to \dU? Or am I misunderstanding something? You mean \dfU? Yes, if there's no pattern. Yeah, that's what I meant. Thanks. +1. Best, David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Joshua D. Drake j...@commandprompt.com writes: On Fri, 2009-01-16 at 09:14 -0800, David E. Wheeler wrote: On Jan 16, 2009, at 8:36 AM, Tom Lane wrote: One issue here is that plain \d gets less useful because it'll now include system catalogs. We could add the additional rule that the above

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Joshua D. Drake
On Fri, 2009-01-16 at 12:40 -0500, Tom Lane wrote: Joshua D. Drake j...@commandprompt.com writes: Again, \dfS would be a bit useless, unless we say that the implicit U modifier for no pattern doesn't override an explicit S modifier. Comments? Does this cover all the cases? So

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Greg Sabino Mullane g...@turnstep.com writes: Comments? Does this cover all the cases? No: the user case someone had upthread, where they want to see all their functions starting with an a across all schemas in their path: \df a* I think either \dfU a* or \dfU *.a* is a sufficiently close

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Robert Haas
One issue here is that plain \d gets less useful because it'll now include system catalogs. We could add the additional rule that the above statements apply only when a pattern is specified, and without a pattern you get just user stuff (so omitting a pattern corresponds to pattern * with

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Changing the scope of the search on the basis of whether or not a pattern is present strikes me as a terrible idea. It's confusing and unlikely to make anyone happy. Huh? The pattern itself changes the scope of the search, so I don't see how this is

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I think either \dfU a* or \dfU *.a* is a sufficiently close approximation to that. The behavior you are asking for is essentially I want to pay attention to the search path, except not actually follow its rules, which is bogus. Either you

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Robert Haas
On Fri, Jan 16, 2009 at 1:09 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Changing the scope of the search on the basis of whether or not a pattern is present strikes me as a terrible idea. It's confusing and unlikely to make anyone happy. Huh? The

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I feel pretty strongly that making the pattern search against a different list of stuff than what the same command would display without the pattern is confusing and a bad idea. It's a bad idea regardless of which particular backslash-sequence we're

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Joshua D. Drake
On Fri, 2009-01-16 at 13:37 -0500, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: I feel pretty strongly that making the pattern search against a different list of stuff than what the same command would display without the pattern is confusing and a bad idea. It's a bad idea

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Josh Berkus
Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: I feel pretty strongly that making the pattern search against a different list of stuff than what the same command would display without the pattern is confusing and a bad idea. It's a bad idea regardless of which particular

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread David E. Wheeler
On Jan 16, 2009, at 10:43 AM, Joshua D. Drake wrote: \df -- all \dfS-- system only \dfU-- non-system only but are we willing to change \d and \dt to work that way too? Or should we leave them inconsistent? I would prefer them

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Comments? Does this cover all the cases? I tend to think that changing which schemas are searched based on the presence or absence of a search pattern is a bad idea. Is the bare form (no U or S) going to search all schemas or the ones on the search path?

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: On Jan 16, 2009, at 10:43 AM, Joshua D. Drake wrote: but are we willing to change \d and \dt to work that way too? Or should we leave them inconsistent? I would prefer them consistent. I think that people will hate the changed behavior to \d

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Greg Sabino Mullane g...@turnstep.com writes: I think either \dfU a* or \dfU *.a* is a sufficiently close approximation to that. The behavior you are asking for is essentially I want to pay attention to the search path, except not actually follow its rules, which is bogus. Either you want to

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Josh Berkus
Tom, which means that Robert's complaint about treating no-pattern differently from pattern falls to the ground. It's exactly what \d has done for years, and nobody has complained about that. Just because they haven't voiced loud complaints doesn't mean that they haven't been *confused* by

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Robert Haas
On Fri, Jan 16, 2009 at 1:37 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I feel pretty strongly that making the pattern search against a different list of stuff than what the same command would display without the pattern is confusing and a bad idea. It's

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Tom, which means that Robert's complaint about treating no-pattern differently from pattern falls to the ground. It's exactly what \d has done for years, and nobody has complained about that. Just because they haven't voiced loud complaints doesn't mean

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Robert Haas
Actually, now that I look at the code, the historical behavior of \d is even weirder than I thought: \d or \d+ *with no pattern* is equivalent to \dtvs(+) (and hence shows all user tables and no system tables) \d or \d+ *with a pattern* takes a completely

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I think you should make: \df - non-system only \dfS - system only \dfA - all Then you could make \dt the same way, and it wouldn't involve breaking the way \dt works now. No, instead it would break \df. As I said before, a solution that was

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Is the bare form (no U or S) going to search all schemas or the ones on the search path? Whatever the answer, do we need a way to get the other? The former, if you specify *.* (or *.anything) as your pattern. The latter, if you don't specify

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I can't shake the feeling that this is about a couple of PostgreSQL hackers (yourself included) not wanting to type \dfS or \dfA or something to get the behavior they currently get with \df. If that's the case, come off it, because there's lots of

Re: [HACKERS] FWD: Re: Updated backslash consistency patch

2009-01-16 Thread Robert Haas
On Fri, Jan 16, 2009 at 3:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I can't shake the feeling that this is about a couple of PostgreSQL hackers (yourself included) not wanting to type \dfS or \dfA or something to get the behavior they currently get