, or * for all\n");
fprintf(fout, " \\da -- list aggregates\n");
fprintf(fout, " \\dd [
+ fprintf(fout, " \\df -- list functions\n");
fprintf(fout, " \\di -- list only indices\n");
fprintf(fout, " \\do -- list operators\n");
fprintf(fout, " \\ds -- list only sequences\n");
else if (strncmp(cmd, "dd", 2) == 0)
/* descriptions */
objectDescription(pset, optarg+1, NULL);
+ else if (strncmp(cmd, "df", 2) == 0)
+ /* functions/procedures */
+ /* we skip in/out funcs by excluding functions that take
+ some arguments, but have no types defined for those arguments */
+ SendQuery(&success, pset,"\
+ SELECT p.proname as function, \
+ t.typname as return_type, \
+ oid8types(p.proargtypes) as arguments, \
+ obj_description(p.oid) \
+ FROM pg_proc p, pg_type t \
+ WHERE p.prorettype = t.oid and \
+ (pronargs = 0 or oid8types(p.proargtypes) != '') \
+ ORDER BY function;",
+ false, false, 0);
else if (strncmp(cmd, "di", 2) == 0)
/* only indices */
tableList(pset, false, 'i');
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.35 1997/11/14 21:37:54 momjian Exp $
+ * $Id: pg_proc.h,v 1.36 1997/11/15 16:32:09 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
DESCR("");
DATA(insert OID = 1348 ( obj_description PGUID 14 f t f 1 f 25 "26" 100 0 0 100 "select description from pg_description where objoid = $1" - ));
DESCR("");
+DATA(insert OID = 1349 ( oid8types PGUID 11 f t f 1 f 25 "30" 100 0 0 100 foo bar ));
+DESCR("");
DATA(insert OID = 1350 ( datetime PGUID 14 f t f 1 f 1184 "1184" 100 0 0 100 "select $1" - ));
DESCR("");
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.29 1997/10/30 16:42:50 thomas Exp $
+ * $Id: builtins.h,v 1.30 1997/11/15 16:32:15 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
/* regproc.c */
extern int32 regprocin(char *proname);
extern char *regprocout(RegProcedure proid);
+extern text *oid8types(Oid (*oidArray)[]);
extern Oid regproctooid(RegProcedure rp);
/* define macro to replace mixed-case function call - tgl 97/04/27 */
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.16 1997/11/15 02:47:23 thomas Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.17 1997/11/15 16:32:25 momjian Exp $
.TH PSQL UNIX 1/20/96 PostgreSQL PostgreSQL
.SH NAME
psql \(em run the interactive query front-end
List aggregates.
.IP "\edd object"
List the description of the table, table.column, type, operator, or aggregate.
+.IP "\edf"
+List functions.
.IP "\edi"
List only indexes.
.IP "\edo"