]> granicus.if.org Git - postgresql/commitdiff
In psql, show view definition only with \d+, not with \d
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 3 Nov 2009 10:34:47 +0000 (10:34 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 3 Nov 2009 10:34:47 +0000 (10:34 +0000)
The rationale is that view definitions tend to be long and obscure the
main information about the view.

src/bin/psql/describe.c

index 51a4db15faa7d945c4477ca9ca03d3a49678d9b2..3fd2b2a97127117880210b83dd5339ce9a50ffa8 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Copyright (c) 2000-2009, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.229 2009/10/28 18:09:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.230 2009/11/03 10:34:47 petere Exp $
  */
 #include "postgres_fe.h"
 
@@ -1306,7 +1306,7 @@ describeOneTableDetails(const char *schemaname,
                printTableAddHeader(&cont, headers[i], true, 'l');
 
        /* Check if table is a view */
-       if (tableinfo.relkind == 'v')
+       if (tableinfo.relkind == 'v' && verbose)
        {
                PGresult   *result;