Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-09-10 Thread Thom Brown
On 18 August 2011 00:22, Josh Kupershmidt wrote: > On Wed, Jul 20, 2011 at 11:38 PM, Josh Kupershmidt wrote: > >> Updated patch attached, along with a revised SQL script to make >> testing easier. I can add this to the next CF. >> >> Note, there is a separate thread[1] with just the psql changes

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-20 Thread Josh Kupershmidt
[Resending with gzip'ed patch this time, I think the last attempt got eaten.] On Mon, Jul 18, 2011 at 11:15 PM, Robert Haas wrote: > On Mon, Jul 18, 2011 at 10:57 PM, Josh Kupershmidt wrote: 1.) For now, I'm just ignoring the issue of visibility checks; I didn't see a simple way to sup

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-18 Thread Robert Haas
On Mon, Jul 18, 2011 at 10:57 PM, Josh Kupershmidt wrote: > Well, I was hoping to go by the existing psql backslash commands' > notions about what qualifies as "system" and what doesn't; that worked > OK for commands which supported the 'S' modifier, but not all do. For > objects like tablespaces,

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-18 Thread Josh Kupershmidt
On Sun, Jul 17, 2011 at 11:25 PM, Robert Haas wrote: > On Sat, Jul 2, 2011 at 8:37 PM, Josh Kupershmidt wrote: >> On Sun, Jun 19, 2011 at 11:59 AM, Josh Kupershmidt >> wrote: > It seems funny to have is_system = true unconditionally for any object > type.  Why'd you do it that way?  Or maybe I

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-17 Thread Robert Haas
On Sat, Jul 2, 2011 at 8:37 PM, Josh Kupershmidt wrote: > On Sun, Jun 19, 2011 at 11:59 AM, Josh Kupershmidt wrote: >> I think we still need to handle my "Still TODO" concerns noted >> upthread. I don't have a lot of time this weekend due to a family >> event, but I was mulling over putting in a

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-15 Thread Robert Haas
On Jul 15, 2011, at 3:48 PM, Josh Berkus wrote: > Josh, > >> Fair enough. If the pg_comments patch does go down in flames, I can >> circle back and patch up the rest of the holes in \dd. > > I am unable to figure out the status of the pg_comments patch from this > thread. What's going on with i

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-15 Thread Josh Berkus
Josh, > Fair enough. If the pg_comments patch does go down in flames, I can > circle back and patch up the rest of the holes in \dd. I am unable to figure out the status of the pg_comments patch from this thread. What's going on with it? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-08 Thread Merlin Moncure
On Thu, Jul 7, 2011 at 9:00 PM, Robert Haas wrote: > On Wed, Jun 29, 2011 at 12:15 PM, Merlin Moncure wrote: >>> I was kind of hoping to avoid dealing with this can of worms with this >>> simple patch, which by itself seems uncontroversial. If there's >>> consensus that \dd and the other backslas

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-08 Thread Josh Kupershmidt
On Thu, Jul 7, 2011 at 10:00 PM, Robert Haas wrote: [review of original, small patch to add another type to \dd's output] > I am inclined to say that we should reject this patch as it stands. That's totally OK - that original patch was of marginal use given the larger brokenness of \dd. > With

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-07 Thread Robert Haas
On Wed, Jun 29, 2011 at 12:15 PM, Merlin Moncure wrote: >> I was kind of hoping to avoid dealing with this can of worms with this >> simple patch, which by itself seems uncontroversial. If there's >> consensus that \dd and the other backslash commands need further >> reworking, I can probably devo

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-07-02 Thread Josh Kupershmidt
On Wed, Jun 29, 2011 at 12:15 PM, Merlin Moncure wrote: > Patch applies clean, does what it is supposed to do, and matches other > conventions in describe.c  Passing to committer.   pg_comments may be > a better way to go, but that is a problem for another day... Thanks for the review, and sorry

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-29 Thread Merlin Moncure
On Thu, May 19, 2011 at 9:36 PM, Josh Kupershmidt wrote: > On Thu, May 19, 2011 at 10:26 AM, Robert Haas wrote: >> At the risk of opening a can of worms, if we're going to fix \dd, >> shouldn't we fix it completely, and include comments on ALL the object >> types that can have them?  IIRC it's mi

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-19 Thread Josh Kupershmidt
On Sun, Jun 19, 2011 at 3:25 AM, Kohei KaiGai wrote: > 2011/6/18 Josh Kupershmidt : > I think the v5 patch should be marked as 'Ready for Committer' I think we still need to handle my "Still TODO" concerns noted upthread. I don't have a lot of time this weekend due to a family event, but I was mu

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-19 Thread Kohei KaiGai
I think the v5 patch should be marked as 'Ready for Committer' 2011/6/18 Josh Kupershmidt : > On Sat, Jun 18, 2011 at 10:53 AM, Kohei KaiGai wrote: >> In addition, this pg_comments system view supports 'access method' class, but >> we cannot set a comment on access methods using COMMENT ON statem

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-18 Thread Robert Haas
On Sat, Jun 18, 2011 at 1:43 PM, Josh Kupershmidt wrote: >> Regarding to the data-type of objnamespace, how about an idea to define a new >> data type such as 'regschema' and cast objnamespace into this type? >> If we have such data type, user can reference string expression of schema >> name, >>

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-18 Thread Kohei KaiGai
I checked the v4 patch. At first, I noticed three missing object classes although COMMENT ON allows to set a description on 'collation', 'extension' and 'foreign table'. In addition, this pg_comments system view supports 'access method' class, but we cannot set a comment on access methods using CO

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 2:06 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera >> wrote: >>> Hmm, if we're going to have pg_comments as a syntactic sugar kind of >>> thing, it should output things in format immediately useful to the user, >>> i.e. relatio

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-06 Thread Tom Lane
Robert Haas writes: > On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera > wrote: >> Hmm, if we're going to have pg_comments as a syntactic sugar kind of >> thing, it should output things in format immediately useful to the user, >> i.e. relation/column/etc names and not OIDs.  The OIDs would force y

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera wrote: > Excerpts from Josh Kupershmidt's message of dom jun 05 16:36:57 -0400 2011: >> On Tue, May 24, 2011 at 10:31 PM, Josh Kupershmidt >> wrote: >> > Attached is a rebased patch. From a quick look, it seems that most of >> > the object types mis

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-06-06 Thread Alvaro Herrera
Excerpts from Josh Kupershmidt's message of dom jun 05 16:36:57 -0400 2011: > On Tue, May 24, 2011 at 10:31 PM, Josh Kupershmidt wrote: > > Attached is a rebased patch. From a quick look, it seems that most of > > the object types missing from \dd are already covered by pg_comments > > (cast, cons

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-05-23 Thread Robert Haas
On Mon, May 23, 2011 at 10:13 PM, Josh Kupershmidt wrote: > Well actually, I got into messing with this solely from the Todo list. > Which, of course, neglected to mention the thread about pg_comments, > or the other objects missing from \dd. Heh. Sounds like updating the Todo list would be a go

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-05-23 Thread Josh Kupershmidt
On Sun, May 22, 2011 at 11:33 PM, Robert Haas wrote: > On Thu, May 19, 2011 at 10:36 PM, Josh Kupershmidt wrote: >> Precisely, and I think there's a solid argument for putting >> constraints into bucket 1 above, as this patch does, since there's no >> good room to display constraint comments insi

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-05-22 Thread Robert Haas
On Thu, May 19, 2011 at 10:36 PM, Josh Kupershmidt wrote: > Precisely, and I think there's a solid argument for putting > constraints into bucket 1 above, as this patch does, since there's no > good room to display constraint comments inside \d+, and there's no > backslash command specifically for

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-05-19 Thread Josh Kupershmidt
On Thu, May 19, 2011 at 10:26 AM, Robert Haas wrote: > At the risk of opening a can of worms, if we're going to fix \dd, > shouldn't we fix it completely, and include comments on ALL the object > types that can have them?  IIRC it's missing a bunch, not just > constraints. You opened this can up,

Re: [HACKERS] patch: Allow \dd to show constraint comments

2011-05-19 Thread Robert Haas
On Tue, May 17, 2011 at 10:27 PM, Josh Kupershmidt wrote: > Hi all, > > Attached is a simple patch addressing the TODO item "Allow \dd to show > constraint comments". If you have comments on various constraints > (column, foreign key, primary key, unique, exclusion), they should > show up via \dd