Using \da in psql should show the return type.

Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.188
diff -c -r1.188 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	3 Mar 2007 17:19:11 -0000	1.188
--- doc/src/sgml/ref/psql-ref.sgml	14 Mar 2007 19:18:42 -0000
***************
*** 875,882 ****
  
          <listitem>
          <para>
!         Lists all available aggregate functions, together with the data
!         types they operate on. If <replaceable
          class="parameter">pattern</replaceable>
          is specified, only aggregates whose names match the pattern are shown.
          </para>
--- 875,882 ----
  
          <listitem>
          <para>
!         Lists all available aggregate functions, together with their
!         return type, and the data types they operate on. If <replaceable
          class="parameter">pattern</replaceable>
          is specified, only aggregates whose names match the pattern are shown.
          </para>
Index: src/bin/psql/describe.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/describe.c,v
retrieving revision 1.152
diff -c -r1.152 describe.c
*** src/bin/psql/describe.c	20 Feb 2007 10:23:38 -0000	1.152
--- src/bin/psql/describe.c	14 Mar 2007 19:18:42 -0000
***************
*** 62,82 ****
  	printfPQExpBuffer(&buf,
  					  "SELECT n.nspname as \"%s\",\n"
  					  "  p.proname AS \"%s\",\n"
  					  "  CASE WHEN p.pronargs = 0\n"
  					  "    THEN CAST('*' AS pg_catalog.text)\n"
  					  "    ELSE\n"
  					  "    pg_catalog.array_to_string(ARRAY(\n"
  					  "      SELECT\n"
! 				 "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
  					  "      FROM\n"
  					  "        pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n"
  					  "    ), ', ')\n"
  					  "  END AS \"%s\",\n"
! 				 "  pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n"
  					  "FROM pg_catalog.pg_proc p\n"
! 	   "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
  					  "WHERE p.proisagg\n",
! 					  _("Schema"), _("Name"),
  					  _("Argument data types"), _("Description"));
  
  	processSQLNamePattern(pset.db, &buf, pattern, true, false,
--- 62,83 ----
  	printfPQExpBuffer(&buf,
  					  "SELECT n.nspname as \"%s\",\n"
  					  "  p.proname AS \"%s\",\n"
+ 					  "  pg_catalog.format_type(p.prorettype, NULL) AS \"%s\",\n" 
  					  "  CASE WHEN p.pronargs = 0\n"
  					  "    THEN CAST('*' AS pg_catalog.text)\n"
  					  "    ELSE\n"
  					  "    pg_catalog.array_to_string(ARRAY(\n"
  					  "      SELECT\n"
! 					  "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
  					  "      FROM\n"
  					  "        pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n"
  					  "    ), ', ')\n"
  					  "  END AS \"%s\",\n"
! 					  "  pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n"
  					  "FROM pg_catalog.pg_proc p\n"
! 					  "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
  					  "WHERE p.proisagg\n",
! 					  _("Schema"), _("Name"), _("Result data type"),
  					  _("Argument data types"), _("Description"));
  
  	processSQLNamePattern(pset.db, &buf, pattern, true, false,
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to