Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
348b6218
Commit
348b6218
authored
Mar 16, 2007
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show aggregate return types in psql \da output.
Greg Sabino Mullane
parent
95f6d2d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+3
-3
src/bin/psql/describe.c
src/bin/psql/describe.c
+6
-5
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
348b6218
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.18
8 2007/03/03 17:19:11 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.18
9 2007/03/16 08:28:01 mha
Exp $
PostgreSQL documentation
-->
...
...
@@ -875,8 +875,8 @@ testdb=>
<listitem>
<para>
Lists all available aggregate functions, together with the
data
types they operate on. If <replaceable
Lists all available aggregate functions, together with the
ir
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>
...
...
src/bin/psql/describe.c
View file @
348b6218
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.15
2 2007/02/20 10:23:38 petere
Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.15
3 2007/03/16 08:28:01 mha
Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
...
...
@@ -62,21 +62,22 @@ describeAggregates(const char *pattern, bool verbose)
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
"
" 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
"
" 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
"
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
\n
"
"WHERE p.proisagg
\n
"
,
_
(
"Schema"
),
_
(
"Name"
),
_
(
"Schema"
),
_
(
"Name"
),
_
(
"Result data type"
),
_
(
"Argument data types"
),
_
(
"Description"
));
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment