Re: View String or Representation

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: gss+pg(at)cs(dot)brown(dot)edu
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: View String or Representation
Date: 2002-06-11 16:56:09
Message-ID: 200206111656.g5BGu9322110@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

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(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-06-11 17:27:09 Re: Poor performance in Porting Oracle based application to PostgreSQL
Previous Message SERFIOTIs gewrgios 2002-06-11 16:28:25 Re: View String or Representation

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeremy Buchmann 2002-06-11 20:23:59 Re: Date in JDBC
Previous Message SERFIOTIs gewrgios 2002-06-11 16:28:25 Re: View String or Representation