Re: View definition formatting

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: View definition formatting
Date: 2003-04-01 13:11:54
Message-ID: 3E89901A.80A91218@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers 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(at)Yahoo(dot)com #

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-01 15:36:08 Re: View definition formatting
Previous Message Dave Page 2003-04-01 12:35:24 FW: View definition formatting

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-01 15:00:16 Re: GROUP BY + join regression in 7.3
Previous Message Dave Page 2003-04-01 12:34:38 View definition formatting