Re: View String or Representation
От | Jan Wieck |
---|---|
Тема | Re: View String or Representation |
Дата | |
Msg-id | 200206111656.g5BGu9322110@saturn.janwieck.net обсуждение исходный текст |
Ответ на | Re: View String or Representation (Gregory Seidman <gss+pg@cs.brown.edu>) |
Список | 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 по дате отправления: