| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | pretty print viewdefs |
| Date: | 2009-08-26 14:02:33 |
| Message-ID: | 4A954079.9060704@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
[originally sent from wrong account :-( ]
The tiny patch attached fixes a long-standing peeve of mine (and at
least one of my clients'), namely that the target list printed in
viewdefs are unreadable.
example output now looks like this:
regression=# select pg_get_viewdef('shoe',true);
pg_get_viewdef
-----------------------------------------------
SELECT
sh.shoename,
sh.sh_avail,
sh.slcolor,
sh.slminlen,
sh.slminlen * un.un_fact AS slminlen_cm,
sh.slmaxlen,
sh.slmaxlen * un.un_fact AS slmaxlen_cm,
sh.slunit
FROM shoe_data sh, unit un
WHERE sh.slunit = un.un_name;
Is there any objection?
cheers
andrew
| Attachment | Content-Type | Size |
|---|---|---|
| prettyprint.patch | text/x-patch | 599 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2009-08-26 14:07:33 | Re: PostgreSQL does CAST implicitely between int and a domain derived from int during SELECT query |
| Previous Message | Jean-Michel Pouré | 2009-08-26 13:52:38 | PostgreSQL does CAST implicitely between int and a domain derived from int during SELECT query |