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

Re: pg_dump --pretty-print-views

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marko Tiikkaja <pgmail(at)joh(dot)to>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --pretty-print-views
Date: 2013-01-31 11:10:53
Message-ID: m27gmta9qa.fsf@2ndQuadrant.fr (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Well, we could actually set the wrap value to 0, which would mean always
> wrap. That wouldn't be making any assumption about the user's terminal
> window size ;-)

+1

> Personally I find the wrapped case MUCH more readable. I guess anything is
> an advance, but turning on PRETTY_INDENT without turning on some level of
> target wrapping seems like a half-done job.

Minor gripe: the CASE WHEN THEN indenting is not ideal:

  CASE
      WHEN (a.attnotnull OR ((t.typtype = 'd'::"char") AND t.typnotnull)) THEN 'NO'::text
      ELSE 'YES'::text
  END)::information_schema.yes_or_no AS is_nullable, 

I think the following is easier to read:

  CASE
      WHEN (a.attnotnull OR ((t.typtype = 'd'::"char") AND t.typnotnull))
      THEN 'NO'::text
      ELSE 'YES'::text
  END)::information_schema.yes_or_no AS is_nullable, 

But I realise it's not exactly what's being talked about in this thread…

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


In response to

Responses

pgsql-hackers by date

Next:From: MauMauDate: 2013-01-31 12:12:06
Subject: Re: backend hangs at immediate shutdown
Previous:From: Bernd HelmleDate: 2013-01-31 10:56:15
Subject: Re: pgsql: Improve concurrency of foreign key locking

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group