Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.117
diff -c -c -r1.117 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	12 Jul 2004 20:41:08 -0000	1.117
--- doc/src/sgml/ref/psql-ref.sgml	13 Jul 2004 16:42:35 -0000
***************
*** 990,996 ****
          Lists all available schemas (namespaces). If pattern (a regular expression)
          is specified, only schemas whose names match the pattern are listed.
!         Non-local temporary schemas are suppressed.
          
          
        
--- 990,998 ----
          Lists all available schemas (namespaces). If pattern (a regular expression)
          is specified, only schemas whose names match the pattern are listed.
!         Non-local temporary schemas are suppressed.  If +
!         is appended to the command name, each object is listed with its associated
!         permissions and description, if any.
          
          
        
Index: src/bin/psql/command.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/command.c,v
retrieving revision 1.120
diff -c -c -r1.120 command.c
*** src/bin/psql/command.c	11 Jul 2004 21:34:03 -0000	1.120
--- src/bin/psql/command.c	13 Jul 2004 16:42:36 -0000
***************
*** 326,332 ****
  				success = do_lo_list();
  				break;
  			case 'n':
! 				success = listSchemas(pattern);
  				break;
  			case 'o':
  				success = describeOperators(pattern);
--- 326,332 ----
  				success = do_lo_list();
  				break;
  			case 'n':
! 				success = listSchemas(pattern, show_verbose);
  				break;
  			case 'o':
  				success = describeOperators(pattern);
Index: src/bin/psql/describe.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/describe.c,v
retrieving revision 1.101
diff -c -c -r1.101 describe.c
*** src/bin/psql/describe.c	13 Jul 2004 02:46:21 -0000	1.101
--- src/bin/psql/describe.c	13 Jul 2004 16:42:39 -0000
***************
*** 1693,1699 ****
   * Describes schemas (namespaces)
   */
  bool
! listSchemas(const char *pattern)
  {
  	PQExpBufferData buf;
  	PGresult   *res;
--- 1693,1699 ----
   * Describes schemas (namespaces)
   */
  bool
! listSchemas(const char *pattern, bool verbose)
  {
  	PQExpBufferData buf;
  	PGresult   *res;
***************
*** 1702,1714 ****
  	initPQExpBuffer(&buf);
  	printfPQExpBuffer(&buf,
  		"SELECT n.nspname AS \"%s\",\n"
! 		"       u.usename AS \"%s\"\n"
! 		"FROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u\n"
  		"       ON n.nspowner=u.usesysid\n"
  		"WHERE	(n.nspname NOT LIKE 'pg\\\\_temp\\\\_%%' OR\n"
! 		"		 n.nspname = (pg_catalog.current_schemas(true))[1])\n",	/* temp schema is first */
! 					  _("Name"),
! 					  _("Owner"));
  	processNamePattern(&buf, pattern, true, false,
  					   NULL, "n.nspname", NULL,
  					   NULL);
--- 1702,1722 ----
  	initPQExpBuffer(&buf);
  	printfPQExpBuffer(&buf,
  		"SELECT n.nspname AS \"%s\",\n"
! 		"       u.usename AS \"%s\"",
! 		_("Name"), _("Owner"));
! 		
! 	if (verbose)
! 		appendPQExpBuffer(&buf,
! 			",\n  n.nspacl as \"%s\","
! 			"  pg_catalog.obj_description(n.oid, 'pg_namespace') as \"%s\"",
! 			_("Access privileges"), _("Description"));
! 						  
! 	appendPQExpBuffer(&buf,
! 		"\nFROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u\n"
  		"       ON n.nspowner=u.usesysid\n"
  		"WHERE	(n.nspname NOT LIKE 'pg\\\\_temp\\\\_%%' OR\n"
! 		"		 n.nspname = (pg_catalog.current_schemas(true))[1])\n");	/* temp schema is first */
! 
  	processNamePattern(&buf, pattern, true, false,
  					   NULL, "n.nspname", NULL,
  					   NULL);
Index: src/bin/psql/describe.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/describe.h,v
retrieving revision 1.24
diff -c -c -r1.24 describe.h
*** src/bin/psql/describe.h	18 Jun 2004 06:14:04 -0000	1.24
--- src/bin/psql/describe.h	13 Jul 2004 16:42:39 -0000
***************
*** 56,62 ****
  bool		listCasts(const char *pattern);
  
  /* \dn */
! bool		listSchemas(const char *pattern);
  
  
  #endif   /* DESCRIBE_H */
--- 56,62 ----
  bool		listCasts(const char *pattern);
  
  /* \dn */
! bool		listSchemas(const char *pattern, bool verbose);
  
  
  #endif   /* DESCRIBE_H */
Index: src/bin/psql/help.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/help.c,v
retrieving revision 1.88
diff -c -c -r1.88 help.c
*** src/bin/psql/help.c	18 Jun 2004 06:14:04 -0000	1.88
--- src/bin/psql/help.c	13 Jul 2004 16:42:40 -0000
***************
*** 218,224 ****
  	fprintf(output, _("  \\dD [PATTERN]  list domains\n"));
  	fprintf(output, _("  \\df [PATTERN]  list functions (add \"+\" for more detail)\n"));
  	fprintf(output, _("  \\dg [PATTERN]  list groups\n"));
! 	fprintf(output, _("  \\dn [PATTERN]  list schemas\n"));
  	fprintf(output, _("  \\do [NAME]     list operators\n"));
  	fprintf(output, _("  \\dl            list large objects, same as \\lo_list\n"));
  	fprintf(output, _("  \\dp [PATTERN]  list table, view and sequence access privileges\n"));
--- 218,224 ----
  	fprintf(output, _("  \\dD [PATTERN]  list domains\n"));
  	fprintf(output, _("  \\df [PATTERN]  list functions (add \"+\" for more detail)\n"));
  	fprintf(output, _("  \\dg [PATTERN]  list groups\n"));
! 	fprintf(output, _("  \\dn [PATTERN]  list schemas (add \"+\" for more detail)\n"));
  	fprintf(output, _("  \\do [NAME]     list operators\n"));
  	fprintf(output, _("  \\dl            list large objects, same as \\lo_list\n"));
  	fprintf(output, _("  \\dp [PATTERN]  list table, view and sequence access privileges\n"));