Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: \d+ for long view definitions?


  • From: Peter Eisentraut <peter_e(at)gmx(dot)net>
  • To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: \d+ for long view definitions?
  • Date: Fri, 30 Oct 2009 00:41:26 +0200
  • Message-id: <1256856086.9673.2.camel@vanquo.pezone.net> <text/plain>

On tis, 2009-09-01 at 14:29 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > I think we should always or never show the view definition, not sometimes.
> 
> Yeah.  I can live with \d not showing it and \d+ showing it --- as Peter
> already mentioned, that would be consistent with \df behavior.  Making
> it depend on the length is just weird.

The patch for this endeavor is:

diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -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;

Any final words?




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group