Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2RBkiw76592 for ; Tue, 27 Mar 2001 06:46:44 -0500 (EST) (envelope-from janwieck@yahoo.com) Received: from pd957742b.dip.t-dialin.net (HELO jupiter.jw.home) (217.87.116.43) by smtp.mail.vip.sc5.yahoo.com with SMTP; 27 Mar 2001 11:46:41 -0000 X-Apparently-From: Received: (from janwieck@localhost) by jupiter.jw.home (8.9.3/8.9.3) id EAA26742; Tue, 27 Mar 2001 04:43:15 -0500 From: Jan Wieck Message-Id: <200103270943.EAA26742@jupiter.jw.home> Subject: Re: all views in database broken at once In-Reply-To: <20010325191424.A60295@ilse.nl> from Mathijs Brands at "Mar 25, 2001 07:14:24 pm" To: Mathijs Brands Date: Tue, 27 Mar 2001 04:43:15 -0500 (EST) CC: Tom Lane , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/547 X-Sequence-Number: 2217 Mathijs Brands wrote: > On Sat, Mar 24, 2001 at 11:36:56PM -0500, Tom Lane allegedly wrote: > > Mathijs Brands writes: > > > How about being able to recompile them (keeping the SQL around in the > > > system catalogs)? Doesn't Oracle allow you to do something like that? > > > > That's another possibility. It's not real clear that there's any > > advantage to storing rules in preparsed form to begin with --- if > > we just stored the original text and reparsed it each time it was > > read, the system would be vastly more flexible, and probably not > > noticeably slower. > > But every bit of performance counts, of course... The question is if parsing the original query is that more expensive than converting the printed node tree back into it's binary representation, what's done now. And then again, this is only done when the relation is opened and it's RelationData not found in the relcache. If the relcache serves well, this happens once per connection. OTOH, due to toast we don't need to save space in the pg_rewrite tuples any more. Adding two new attributes to hold just the backparsed rule qualification and actions (backparsed from the nodes like done for pg_dump), it might be easy to create a utility that recompiles rules - for one or all relations. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com