Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:27 PM, Alvaro Herrera alvhe...@2ndquadrant.com
wrote:

 Magnus Hagander wrote:
  After running into the need twice now - is there a particular reason why
 we
  don't have psql showing the owner of a type, at least in \dT+?

 Can't think of anything ...

  If not, how about attached trivial patch?

 Owner should normally be printed before ACL, no?


That's probably correct.

Done that way and pushed.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


[HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
After running into the need twice now - is there a particular reason why we
don't have psql showing the owner of a type, at least in \dT+?

If not, how about attached trivial patch?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
*** a/src/bin/psql/describe.c
--- b/src/bin/psql/describe.c
***
*** 533,538  describeTypes(const char *pattern, bool verbose, bool showSystem)
--- 533,544 
  		printACLColumn(buf, t.typacl);
  		appendPQExpBufferStr(buf, ,\n  );
  	}
+ 	if (verbose)
+ 	{
+ 		appendPQExpBuffer(buf,
+ 		pg_catalog.pg_get_userbyid(t.typowner) AS \%s\,\n,
+ 		  gettext_noop(Owner));
+ 	}
  
  	appendPQExpBuffer(buf,
    pg_catalog.obj_description(t.oid, 'pg_type') as \%s\\n,

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Alvaro Herrera
Magnus Hagander wrote:
 After running into the need twice now - is there a particular reason why we
 don't have psql showing the owner of a type, at least in \dT+?

Can't think of anything ...

 If not, how about attached trivial patch?

Owner should normally be printed before ACL, no?


-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers