summaryrefslogtreecommitdiff
path: root/src/bin/psql/describe.h
diff options
context:
space:
mode:
authorBruce Momjian1999-11-26 04:24:17 +0000
committerBruce Momjian1999-11-26 04:24:17 +0000
commit78bc83fedf7f865534c61dd14067fc80d580ed29 (patch)
tree48a574c438d31fa6bd28ec87a7f3d413e901bb8f /src/bin/psql/describe.h
parentc83b4d1cd8afc557b1efad71e3bf99b81c27e57a (diff)
* Includes tab completion. It's not magic, but it's very cool. At any
rate it's better than what used to be there. * Does proper SQL "host variable" substitution as pointed out by Andreas Zeugwetter (thanks): select * from :foo; Also some changes in how ':' and ';' are treated (escape with \ to send to backend). This does _not_ affect the '::' cast operator, but perhaps others that contain : or ; (but there are none right now). * To show description with a <something> listing, append '?' to command name, e.g., \df?. This seemed to be the convenient and logical solution. Or append a '+' to see more useless information, e.g., \df+. * Fixed fflush()'ing bug pointed out by Jan during the regression test discussion. * Added LastOid variable. This ought to take care of TODO item "Add a function to return the last inserted oid, for use in psql scripts" (under CLIENTS) E.g., insert into foo values(...); insert into bar values(..., :LastOid); \echo $LastOid * \d command shows constraints, rules, and triggers defined on the table (in addition to indices) * Various fixes, optimizations, corrections * Documentation update as well Note: This now requires snprintf(), which, if necessary, is taken from src/backend/port. This is certainly a little weird, but it should suffice until a source tree cleanup is done. Enjoy. -- Peter Eisentraut Sernanders väg 10:115
Diffstat (limited to 'src/bin/psql/describe.h')
-rw-r--r--src/bin/psql/describe.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h
index 3ab6367c8df..164c7044e70 100644
--- a/src/bin/psql/describe.h
+++ b/src/bin/psql/describe.h
@@ -1,42 +1,34 @@
#ifndef DESCRIBE_H
#define DESCRIBE_H
+#include <c.h>
#include "settings.h"
/* \da */
-bool
- describeAggregates(const char *name, PsqlSettings *pset);
+bool describeAggregates(const char *name, PsqlSettings *pset, bool verbose, bool desc);
/* \df */
-bool
- describeFunctions(const char *name, PsqlSettings *pset);
+bool describeFunctions(const char *name, PsqlSettings *pset, bool verbose, bool desc);
/* \dT */
-bool
- describeTypes(const char *name, PsqlSettings *pset);
+bool describeTypes(const char *name, PsqlSettings *pset, bool verbose, bool desc);
/* \do */
-bool
- describeOperators(const char *name, PsqlSettings *pset);
+bool describeOperators(const char *name, PsqlSettings *pset, bool verbose, bool desc);
-/* \dp (formerly \z) */
-bool
- permissionsList(const char *name, PsqlSettings *pset);
+/* \z (or \dp) */
+bool permissionsList(const char *name, PsqlSettings *pset);
/* \dd */
-bool
- objectDescription(const char *object, PsqlSettings *pset);
+bool objectDescription(const char *object, PsqlSettings *pset);
/* \d foo */
-bool
- describeTableDetails(const char *name, PsqlSettings *pset);
+bool describeTableDetails(const char *name, PsqlSettings *pset, bool desc);
/* \l */
-bool
- listAllDbs(PsqlSettings *pset);
+bool listAllDbs(PsqlSettings *pset, bool desc);
-/* \dt, \di, \dS, etc. */
-bool
- listTables(const char *infotype, const char *name, PsqlSettings *pset);
+/* \dt, \di, \ds, \dS, etc. */
+bool listTables(const char *infotype, const char *name, PsqlSettings *pset, bool desc);
#endif /* DESCRIBE_H */