pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lex Berezhny <LBerezhny@DevIS.com>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: pg_views
Date: 03 Feb 2003 21:34:03 -0500
Message-ID: <1044326043.13139.17.camel@buddha> (raw)

hi,

  I'm trying to write some code that can analyze the database structure
and i need a way to discover the composition of a view (the tables and
table.column info).

  I've managed to do much of this by querying the pg_views for the
definition and literally parsing the SQL myself, but obviously that has
many limitations unless I impliment a complete SQL parser and that's
beyond the scope of what I want  :-)

  I'm wondering if PostgreSQL actually reparses the view definition on
each invocation or if it stores the required information in some
accessible place.

  My goal is to take a view name as input and output the tables and
columns composing the view.


thanks in advance,

 - lex

-- 
Lex Berezhny <LBerezhny@DevIS.com>




view thread (4+ messages)  latest in thread

Message-ID: <1044326043.13139.17.camel@buddha>
Permalink:  ../1044326043.13139.17.camel@buddha/
Also on:    postgresql.org/message-id/1044326043.13139.17.camel@buddha

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: LBerezhny@DevIS.com
  Subject: Re: pg_views
  In-Reply-To: <1044326043.13139.17.camel@buddha>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox