Re: View definition formatting - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: View definition formatting
Date
Msg-id 3E89901A.80A91218@Yahoo.com
Whole thread Raw
In response to View definition formatting  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: View definition formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Dave Page wrote:
> 
> Hi all,
> 
> When using pg_get_viewdef(oid), the view definition is returned in a
> reconstructed form (I assume) with all formatting removed. This is a
> pain for apps like pgAdmin, that allow the user to edit their views,
> particularly with very large ones.
> 
> Would it be possible and sensible to store the original view definition
> for future use, such as we do for functions? Perhaps a new catalog
> (pg_source?) could store these and other definitions such as rules for
> use?

Not too obvious, but this should be covered in the TODO item "Allow RULE
recompilation". That is because if the rule/view is broken due to other
schema changes, the reconstruction might fail. Thus we need to save a
textual form and the original CREATE statement from the user seems
logical.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: View definition formatting
Next
From: Tom Lane
Date:
Subject: Re: GROUP BY + join regression in 7.3