Re: View String or Representation - Mailing list pgsql-general

From Jan Wieck
Subject Re: View String or Representation
Date
Msg-id 200206111656.g5BGu9322110@saturn.janwieck.net
Whole thread Raw
In response to Re: View String or Representation  (Gregory Seidman <gss+pg@cs.brown.edu>)
List pgsql-general
Gregory Seidman wrote:
> SERFIOTIs gewrgios sez:
> }  does anyone know when I create a view where does Postgresql
> } store the string with the view definition or any other internal
> } representation of the view?
> }
> } I have looked up for the question in two Postgresql manual without finding
> } an answer!
>
> If you use psql, you can type \d <viewname> to get the definition of the
> view. If you start psql with the -E and type that you will see the SQL that
> psql is invoking to find the information, including the reference to the
> pg_views system table.

    pg_views isn't a system table at all! It is a view itself :-)

    This system view is calling a function that reconstructs  the
    view  definition  from  the information stored in pg_rewrite,
    which is an ASCII representation of  the  internal  parsetree
    format of a query rewrite rule.


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-general by date:

Previous
From: Sekhar
Date:
Subject: details of postgres front
Next
From: Neil Conway
Date:
Subject: Re: Poor performance in Porting Oracle based application to PostgreSQL