Re: [HACKERS] psql \d+ and oid display

2014-04-15 Thread Bruce Momjian
On Thu, Apr 10, 2014 at 08:05:11PM -0400, Bruce Momjian wrote: > On Thu, Apr 10, 2014 at 07:58:55PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > It also has changed the OID status to only display if it exists. One > > > question that came up with Robert is whether OID status should appe

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Bruce Momjian
On Thu, Apr 10, 2014 at 07:58:55PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > It also has changed the OID status to only display if it exists. One > > question that came up with Robert is whether OID status should appear > > for \d as well, now that is only shows up when present. > > Yea

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Tom Lane
Bruce Momjian writes: > It also has changed the OID status to only display if it exists. One > question that came up with Robert is whether OID status should appear > for \d as well, now that is only shows up when present. Yeah, I was wondering about that too. If part of the argument here is to

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Bruce Momjian
On Thu, Apr 10, 2014 at 01:10:35PM -0400, Bruce Momjian wrote: > On Thu, Apr 10, 2014 at 01:05:32PM -0400, Greg Stark wrote: > > If it's conditional I think "when it matches a guc" is too hard for users to > > use. > > Yes, we gave up on having the OID display match the GUC; we just > display som

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Bruce Momjian
On Tue, Apr 1, 2014 at 10:45:29AM -0700, Jeff Janes wrote: > I am suggesting it for at least some other things. I'm rather aggrieved that > " > \d+" without argument shows you the size and the description/comment for every > table, but "\d+ foo" does not show you the size and description/comment

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Bruce Momjian
On Thu, Apr 10, 2014 at 01:05:32PM -0400, Greg Stark wrote: > If it's conditional I think "when it matches a guc" is too hard for users to > use. Yes, we gave up on having the OID display match the GUC; we just display something if and only if it oids are present. Robert is talking about the "Id

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Greg Stark
If it's conditional I think "when it matches a guc" is too hard for users to use. I think "say nothing if oids are off and say something of their on" would be fine. It would result in clutter for users which oids on by default but that's a non default setting. And the consequences of having oids

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Bruce Momjian
On Thu, Apr 10, 2014 at 12:23:40PM -0400, Robert Haas wrote: > > What might make more sense is this: > > > > if ((tableinfo.relkind == 'r' || tableinfo.relkind == 'm') && > > /* > > * No need to display default values; we already display a > > * REPLIC

Re: [HACKERS] psql \d+ and oid display

2014-04-10 Thread Robert Haas
On Wed, Apr 9, 2014 at 11:42 AM, Bruce Momjian wrote: > On Wed, Apr 9, 2014 at 09:27:11AM -0400, Robert Haas wrote: >> On Wed, Apr 9, 2014 at 1:02 AM, Tom Lane wrote: >> > Robert Haas writes: >> >> Well, that's sorta my concern. I mean, right now we've got people >> >> saying "what the heck is

Re: [HACKERS] psql \d+ and oid display

2014-04-09 Thread Andres Freund
On 2014-04-09 11:42:32 -0400, Bruce Momjian wrote: > On Wed, Apr 9, 2014 at 09:27:11AM -0400, Robert Haas wrote: > > On Wed, Apr 9, 2014 at 1:02 AM, Tom Lane wrote: > > > Robert Haas writes: > > >> Well, that's sorta my concern. I mean, right now we've got people > > >> saying "what the heck is

Re: [HACKERS] psql \d+ and oid display

2014-04-09 Thread Bruce Momjian
On Wed, Apr 9, 2014 at 09:27:11AM -0400, Robert Haas wrote: > On Wed, Apr 9, 2014 at 1:02 AM, Tom Lane wrote: > > Robert Haas writes: > >> Well, that's sorta my concern. I mean, right now we've got people > >> saying "what the heck is a replica identity?". But, if the logical > >> decoding stu

Re: [HACKERS] psql \d+ and oid display

2014-04-09 Thread Robert Haas
On Wed, Apr 9, 2014 at 1:02 AM, Tom Lane wrote: > Robert Haas writes: >> Well, that's sorta my concern. I mean, right now we've got people >> saying "what the heck is a replica identity?". But, if the logical >> decoding stuff becomes popular, as I hope it will, that's going to be >> an importa

Re: [HACKERS] psql \d+ and oid display

2014-04-09 Thread Bruce Momjian
On Wed, Apr 9, 2014 at 01:02:05AM -0400, Tom Lane wrote: > Robert Haas writes: > > Well, that's sorta my concern. I mean, right now we've got people > > saying "what the heck is a replica identity?". But, if the logical > > decoding stuff becomes popular, as I hope it will, that's going to be >

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Tom Lane
Robert Haas writes: > Well, that's sorta my concern. I mean, right now we've got people > saying "what the heck is a replica identity?". But, if the logical > decoding stuff becomes popular, as I hope it will, that's going to be > an important thing for people to adjust, and the information need

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Robert Haas
On Tue, Apr 8, 2014 at 5:37 PM, Bruce Momjian wrote: > On Tue, Apr 8, 2014 at 05:29:45PM -0400, Tom Lane wrote: >> Bruce Momjian writes: >> > If we ignore backward compatibility, then "Has OIDs" and "Identity >> > Replica" are similar. One thing that strongly (for me) supports not >> > always p

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Bruce Momjian writes: > > If we ignore backward compatibility, then "Has OIDs" and "Identity > > Replica" are similar. One thing that strongly (for me) supports not > > always printing them is that I expect more people will be confused by > > the mention o

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Bruce Momjian
On Tue, Apr 8, 2014 at 05:29:45PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > If we ignore backward compatibility, then "Has OIDs" and "Identity > > Replica" are similar. One thing that strongly (for me) supports not > > always printing them is that I expect more people will be confused b

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Tom Lane
Bruce Momjian writes: > If we ignore backward compatibility, then "Has OIDs" and "Identity > Replica" are similar. One thing that strongly (for me) supports not > always printing them is that I expect more people will be confused by > the mention of OIDs or "Identity Replica" than will actually c

Re: [HACKERS] psql \d+ and oid display

2014-04-08 Thread Bruce Momjian
On Tue, Apr 1, 2014 at 01:36:02PM -0400, Robert Haas wrote: > Although I agree with the general principle, I'm skeptical in this > case. There are a bunch of table-level options, and I don't think > it's very reasonable to expect that users are going to remember which > ones are going to be displ

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Jeff Janes
On Tue, Apr 1, 2014 at 8:42 AM, Bruce Momjian wrote: > On Tue, Apr 1, 2014 at 11:30:54AM -0400, Robert Haas wrote: > > > OK, I have now applied the conditional display of "Replica Identity" > > > patch (which is how it was originally coded anyway). The attached > patch > > > matches Tom's sugge

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Andres Freund
On 2014-04-01 13:36:02 -0400, Robert Haas wrote: > I can't accept that tinkering with that is > reducing clutter in any meaningful way; it's just change for the sake > of change. +1 Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Developme

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 12:09 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian wrote: >>> The bottom line is we already have complex rules to display only what is >>> _reasonable_. If you want everything, you have to look at the system >>> tables. > >>

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian wrote: >> The bottom line is we already have complex rules to display only what is >> _reasonable_. If you want everything, you have to look at the system >> tables. > I don't really agree with that. I understand that there's

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Tom Lane
Bruce Momjian writes: > On Tue, Apr 1, 2014 at 11:30:54AM -0400, Robert Haas wrote: >> Frankly, I think this is all completely wrong-headed. \d+ should >> display *everything*. That's what the + means, isn't it? Coming up >> with complex rules for which things get shown and which things get >>

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian wrote: > On Tue, Apr 1, 2014 at 11:30:54AM -0400, Robert Haas wrote: >> > OK, I have now applied the conditional display of "Replica Identity" >> > patch (which is how it was originally coded anyway). The attached patch >> > matches Tom's suggestion

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Bruce Momjian
On Tue, Apr 1, 2014 at 11:30:54AM -0400, Robert Haas wrote: > > OK, I have now applied the conditional display of "Replica Identity" > > patch (which is how it was originally coded anyway). The attached patch > > matches Tom's suggestion of displaying the same OID text, just > > conditionally. >

Re: [HACKERS] psql \d+ and oid display

2014-04-01 Thread Robert Haas
On Sun, Mar 30, 2014 at 10:04 AM, Bruce Momjian wrote: > On Sat, Mar 29, 2014 at 06:33:39PM -0400, Bruce Momjian wrote: >> On Sat, Mar 29, 2014 at 06:16:19PM -0400, Tom Lane wrote: >> > Bruce Momjian writes: >> > > Are you saying most people like "Has OIDs: yes", or the idea of just >> > > displa

Re: [HACKERS] psql \d+ and oid display

2014-03-30 Thread Bruce Momjian
On Sat, Mar 29, 2014 at 06:33:39PM -0400, Bruce Momjian wrote: > On Sat, Mar 29, 2014 at 06:16:19PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > Are you saying most people like "Has OIDs: yes", or the idea of just > > > displaying _a_ line if there are OIDs? Based on default_with_oids,

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Bruce Momjian
On Sat, Mar 29, 2014 at 06:16:19PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > Are you saying most people like "Has OIDs: yes", or the idea of just > > displaying _a_ line if there are OIDs? Based on default_with_oids, > > perhaps we should display "With OIDs". > > > I agree it is no unan

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Tom Lane
Bruce Momjian writes: > Are you saying most people like "Has OIDs: yes", or the idea of just > displaying _a_ line if there are OIDs? Based on default_with_oids, > perhaps we should display "With OIDs". > I agree it is no unanimous. I am curious how large the majority has to > be to change a ps

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Andrew Dunstan
On 03/29/2014 06:10 PM, Bruce Momjian wrote: On Sat, Mar 29, 2014 at 05:10:49PM -0400, Andrew Dunstan wrote: On 03/29/2014 04:49 PM, Bruce Momjian wrote: On Sat, Mar 29, 2014 at 09:59:36AM -0700, David Johnston wrote: As my belief is that 99% of the uses of \d are for human consumption (becau

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Bruce Momjian
On Sat, Mar 29, 2014 at 05:10:49PM -0400, Andrew Dunstan wrote: > > On 03/29/2014 04:49 PM, Bruce Momjian wrote: > >On Sat, Mar 29, 2014 at 09:59:36AM -0700, David Johnston wrote: > >>As my belief is that 99% of the uses of \d are for human consumption > >>(because machines should in most cases hi

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Andrew Dunstan
On 03/29/2014 04:49 PM, Bruce Momjian wrote: On Sat, Mar 29, 2014 at 09:59:36AM -0700, David Johnston wrote: As my belief is that 99% of the uses of \d are for human consumption (because machines should in most cases hit the catalogs directly) then strictly displaying "Includes OIDs" when appro

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Bruce Momjian
On Sat, Mar 29, 2014 at 09:59:36AM -0700, David Johnston wrote: > As my belief is that 99% of the uses of \d are for human consumption > (because machines should in most cases hit the catalogs directly) then > strictly displaying "Includes OIDs" when appropriate has my +1. > > Uses of \d+ in regre

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread David Johnston
Bruce Momjian wrote > On Fri, Mar 28, 2014 at 03:53:32PM -0300, Fabrízio de Royes Mello wrote: >> On Fri, Mar 28, 2014 at 3:41 PM, Tom Lane < > tgl@.pa > > wrote: >> > >> > Bruce Momjian < > bruce@ > > writes: >> > > On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: >> > >> I belie

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Bruce Momjian
On Fri, Mar 28, 2014 at 03:53:32PM -0300, Fabrízio de Royes Mello wrote: > On Fri, Mar 28, 2014 at 3:41 PM, Tom Lane wrote: > > > > Bruce Momjian writes: > > > On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: > > >> I believe Bruce was suggesting to show it when it is set to *not* t

Re: [HACKERS] psql \d+ and oid display

2014-03-29 Thread Robert Haas
On Mar 28, 2014, at 2:41 PM, Tom Lane wrote: > Bruce Momjian writes: >> On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: >>> I believe Bruce was suggesting to show it when it is set to *not* the >>> default, which strikes me as perfectly reasonable. > >> We seem to be split on the

Re: [HACKERS] psql \d+ and oid display

2014-03-28 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Bruce Momjian writes: > > On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: > >> I believe Bruce was suggesting to show it when it is set to *not* the > >> default, which strikes me as perfectly reasonable. > > > We seem to be split on the ide

Re: [HACKERS] psql \d+ and oid display

2014-03-28 Thread Fabrízio de Royes Mello
On Fri, Mar 28, 2014 at 3:41 PM, Tom Lane wrote: > > Bruce Momjian writes: > > On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: > >> I believe Bruce was suggesting to show it when it is set to *not* the > >> default, which strikes me as perfectly reasonable. > > > We seem to be spli

Re: [HACKERS] psql \d+ and oid display

2014-03-28 Thread Tom Lane
Bruce Momjian writes: > On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: >> I believe Bruce was suggesting to show it when it is set to *not* the >> default, which strikes me as perfectly reasonable. > We seem to be split on the idea of having "Has OIDs" display only when > the oid

Re: [HACKERS] psql \d+ and oid display

2014-03-28 Thread Bruce Momjian
On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: > * Euler Taveira (eu...@timbira.com.br) wrote: > > On 27-03-2014 10:15, Bruce Momjian wrote: > > > When we made OIDs optional, we added an oid status display to \d+: > > > > > > test=> \d+ test > > >Table

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Andres Freund
On 2014-03-27 09:15:52 -0400, Bruce Momjian wrote: > When we made OIDs optional, we added an oid status display to \d+: > > test=> \d+ test >Table "public.test" >Column | Type | Modifiers | Storage | Stats target | Description > +-

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 04:43 PM, David Johnston wrote: Bruce Momjian wrote When we made OIDs optional, we added an oid status display to \d+: test=> \d+ test Table "public.test" Column | Type | Modifiers | Storage | Stats target | Description

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread David Johnston
Bruce Momjian wrote > When we made OIDs optional, we added an oid status display to \d+: > > test=> \d+ test >Table "public.test" >Column | Type | Modifiers | Storage | Stats target | Description > +-+---+-+

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Stephen Frost
* Euler Taveira (eu...@timbira.com.br) wrote: > On 27-03-2014 10:15, Bruce Momjian wrote: > > When we made OIDs optional, we added an oid status display to \d+: > > > > test=> \d+ test > > Table "public.test" > > Column | Type | Modifiers | Storage | Stats

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Euler Taveira
On 27-03-2014 10:15, Bruce Momjian wrote: > When we made OIDs optional, we added an oid status display to \d+: > > test=> \d+ test >Table "public.test" >Column | Type | Modifiers | Storage | Stats target | Description > +-+

[HACKERS] psql \d+ and oid display

2014-03-27 Thread Bruce Momjian
When we made OIDs optional, we added an oid status display to \d+: test=> \d+ test Table "public.test" Column | Type | Modifiers | Storage | Stats target | Description +-+---+-+--+-