2000-01-18 23:30:24 +00:00
|
|
|
/*
|
|
|
|
* psql - the PostgreSQL interactive terminal
|
|
|
|
*
|
2005-01-01 05:43:09 +00:00
|
|
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
2000-01-18 23:30:24 +00:00
|
|
|
*
|
2006-02-12 03:22:21 +00:00
|
|
|
* $PostgreSQL: pgsql/src/bin/psql/describe.h,v 1.30 2006/02/12 03:22:19 momjian Exp $
|
2000-01-18 23:30:24 +00:00
|
|
|
*/
|
1999-11-04 21:56:02 +00:00
|
|
|
#ifndef DESCRIBE_H
|
|
|
|
#define DESCRIBE_H
|
|
|
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
|
|
|
/* \da */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeAggregates(const char *pattern, bool verbose);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
2004-06-18 06:14:31 +00:00
|
|
|
/* \db */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeTablespaces(const char *pattern, bool verbose);
|
2004-06-18 06:14:31 +00:00
|
|
|
|
1999-11-04 21:56:02 +00:00
|
|
|
/* \df */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeFunctions(const char *pattern, bool verbose);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
|
|
|
/* \dT */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeTypes(const char *pattern, bool verbose);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
|
|
|
/* \do */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeOperators(const char *pattern);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
2005-08-14 18:49:30 +00:00
|
|
|
/* \du, \dg */
|
2006-02-12 03:22:21 +00:00
|
|
|
extern bool describeRoles(const char *pattern, bool verbose);
|
2003-12-01 22:21:54 +00:00
|
|
|
|
* 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
1999-11-26 04:24:17 +00:00
|
|
|
/* \z (or \dp) */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool permissionsList(const char *pattern);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
|
|
|
/* \dd */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool objectDescription(const char *pattern);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
|
|
|
/* \d foo */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool describeTableDetails(const char *pattern, bool verbose);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
|
|
|
/* \l */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listAllDbs(bool verbose);
|
1999-11-04 21:56:02 +00:00
|
|
|
|
* 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
1999-11-26 04:24:17 +00:00
|
|
|
/* \dt, \di, \ds, \dS, etc. */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listTables(const char *tabtypes, const char *pattern, bool verbose);
|
2001-10-28 06:26:15 +00:00
|
|
|
|
2002-03-19 02:32:21 +00:00
|
|
|
/* \dD */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listDomains(const char *pattern);
|
2002-03-19 02:32:21 +00:00
|
|
|
|
2002-12-12 21:02:25 +00:00
|
|
|
/* \dc */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listConversions(const char *pattern);
|
2002-12-12 21:02:25 +00:00
|
|
|
|
|
|
|
/* \dC */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listCasts(const char *pattern);
|
2002-12-12 21:02:25 +00:00
|
|
|
|
2003-01-07 20:56:07 +00:00
|
|
|
/* \dn */
|
2005-08-14 18:49:30 +00:00
|
|
|
extern bool listSchemas(const char *pattern, bool verbose);
|
2003-01-07 20:56:07 +00:00
|
|
|
|
2002-12-12 21:02:25 +00:00
|
|
|
|
2001-11-05 17:46:40 +00:00
|
|
|
#endif /* DESCRIBE_H */
|