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 br...@momjian.us 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

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

2014-04-10 Thread Robert Haas
On Wed, Apr 9, 2014 at 11:42 AM, Bruce Momjian br...@momjian.us 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 t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Well, that's sorta my concern. I mean, right now

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 * REPLICA IDENTITY

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 on

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

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 of the

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 something if

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

2014-04-10 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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 br...@momjian.us 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

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 robertmh...@gmail.com 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

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

2014-04-09 Thread Robert Haas
On Wed, Apr 9, 2014 at 1:02 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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,

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 t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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

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 t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Well, that's sorta my concern. I mean, right now we've got people

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

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

2014-04-08 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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 br...@momjian.us 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

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

2014-04-08 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Bruce Momjian br...@momjian.us 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

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

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

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

2014-04-08 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

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

2014-04-01 Thread Robert Haas
On Sun, Mar 30, 2014 at 10:04 AM, Bruce Momjian br...@momjian.us 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 br...@momjian.us writes: Are you saying most people like Has OIDs: yes, or the idea

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

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

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian br...@momjian.us 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

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

2014-04-01 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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

2014-04-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian br...@momjian.us 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

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

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 12:09 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian br...@momjian.us wrote: The bottom line is we already have complex rules to display only what is _reasonable_. If you want everything,

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

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

2014-04-01 Thread Jeff Janes
On Tue, Apr 1, 2014 at 8:42 AM, Bruce Momjian br...@momjian.us 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

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 br...@momjian.us writes: Are you saying most people like Has OIDs: yes, or the idea of just displaying _a_ line if there are OIDs? Based on

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

2014-03-29 Thread Robert Haas
On Mar 28, 2014, at 2:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us 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

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 t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: I believe Bruce was suggesting to show it

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 lt; tgl@.pa gt; wrote: Bruce Momjian lt; bruce@ gt; writes: On Thu, Mar 27, 2014 at 02:54:26PM -0400, Stephen Frost wrote: I believe Bruce was

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 regression

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

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 hit the

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

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

2014-03-29 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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 br...@momjian.us 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

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 public.test

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

2014-03-28 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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 t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us 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.

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

2014-03-28 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Bruce Momjian br...@momjian.us 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

[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 +-+---+-+--+-

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

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 target |

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