Thread: Make psql use all pretty print options

Make psql use all pretty print options

From
Christopher Kings-Lynne
Date:
Hi,

This patch finishes off the work that I did with making view
definitions use pretty printing.

It does:

* Pretty check constraints
* Pretty index predicates
* Pretty rule definitions
* Uppercases PRIMARY KEY and UNIQUE to be consistent with CHECK and
FOREIGN KEY
* View rules are improved to match table rules:

        View "public.v"
  Column  |  Type   | Modifiers
----------+---------+-----------
 ?column? | integer |
View definition:
 SELECT 1;
Rules:
 r1 AS
    ON INSERT TO v DO INSTEAD NOTHING
 r2 AS
    ON INSERT TO v DO INSTEAD NOTHING

Chris


Attachment

Re: Make psql use all pretty print options

From
Christopher Kings-Lynne
Date:
This patch hasn't been forgotten about?

Chris

Christopher Kings-Lynne wrote:

> Hi,
>
> This patch finishes off the work that I did with making view
> definitions use pretty printing.
>
> It does:
>
> * Pretty check constraints
> * Pretty index predicates
> * Pretty rule definitions
> * Uppercases PRIMARY KEY and UNIQUE to be consistent with CHECK and
> FOREIGN KEY
> * View rules are improved to match table rules:
>
>         View "public.v"
>   Column  |  Type   | Modifiers
> ----------+---------+-----------
>  ?column? | integer |
> View definition:
>  SELECT 1;
> Rules:
>  r1 AS
>     ON INSERT TO v DO INSTEAD NOTHING
>  r2 AS
>     ON INSERT TO v DO INSTEAD NOTHING
>
> Chris



Re: Make psql use all pretty print options

From
Bruce Momjian
Date:
Christopher Kings-Lynne wrote:
> This patch hasn't been forgotten about?

Uh, I can't find this patch.  That either means it is in CVS already, or
in the 7.5 patches queue:

    http:/momjian.postgresql.org/cgi-bin/pgpatches2

However, I don't see it in there.  Was it for 7.4?  Did I lose it?

Hold, I think I remember this patch --- we talked about it via IM.  You
posted it, but I thought you said it wasn't ready, so I didn't keep it
--- was that the one?

---------------------------------------------------------------------------


>
> Chris
>
> Christopher Kings-Lynne wrote:
>
> > Hi,
> >
> > This patch finishes off the work that I did with making view
> > definitions use pretty printing.
> >
> > It does:
> >
> > * Pretty check constraints
> > * Pretty index predicates
> > * Pretty rule definitions
> > * Uppercases PRIMARY KEY and UNIQUE to be consistent with CHECK and
> > FOREIGN KEY
> > * View rules are improved to match table rules:
> >
> >         View "public.v"
> >   Column  |  Type   | Modifiers
> > ----------+---------+-----------
> >  ?column? | integer |
> > View definition:
> >  SELECT 1;
> > Rules:
> >  r1 AS
> >     ON INSERT TO v DO INSTEAD NOTHING
> >  r2 AS
> >     ON INSERT TO v DO INSTEAD NOTHING
> >
> > Chris
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073