X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A7032474E44 for ; Tue, 4 Feb 2003 04:02:12 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 76B15474E42 for ; Tue, 4 Feb 2003 04:02:11 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Tue Feb 04 10:02:11 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id KAA11740; Tue, 4 Feb 2003 10:02:11 +0100 (MET) Message-ID: <3E3F8192.376AA9CB@rodos.fzk.de> Date: Tue, 04 Feb 2003 10:02:11 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: LBerezhny@DevIS.com Subject: Re: pg_views Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/74 X-Sequence-Number: 11472 > > I'm wondering if PostgreSQL actually reparses the view definition on > each invocation or if it stores the required information in some > accessible place. > The documentation says: Whenever a query against a view (i.e. a virtual table) is made, the rewrite system rewrites the user's query to a query that accesses the base tables given in the view definition instead. > > My goal is to take a view name as input and output the tables and > columns composing the view. > I very much doubt this is possible, unless you step deep into the parser defined in gram.y and scan.l, which is as you mentioned beyond your scope. Regars, Christoph