Re: pg_get_viewdefs() indentation considered harmful - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: pg_get_viewdefs() indentation considered harmful
Date
Msg-id 5364EC72.7050202@joh.to
Whole thread Raw
In response to Re: pg_get_viewdefs() indentation considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_get_viewdefs() indentation considered harmful  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hi all,

Now that we're on the topic of view deparsing, what are your thoughts on 
making this less painful?

local:marko=#* create view foov as select exists(select * from foo);
CREATE VIEW
local:marko=#* \d+ foov                  View "public.foov" Column |  Type   | Modifiers | Storage | Description
--------+---------+-----------+---------+------------- exists | boolean |           | plain   |
View definition: SELECT (EXISTS ( SELECT foo.way,            foo.too,            foo.many,            foo.columns,
     foo.here           FROM foo)) AS "exists";
 


I've switched to using SELECT 1 in EXISTS for this reason, but perhaps 
other people haven't yet done that..


Regards,
Marko Tiikkaja



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: Supporting multiple column assignment in UPDATE (9.5 project)
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_get_viewdefs() indentation considered harmful