LASS="SECT1"
><A
NAME="RULES-VIEWS"
>38.2. Views and the Rule System</A
></H1
><P
>    Views in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> are implemented
    using the rule system. In fact, there is essentially no difference
    between:

</P><PRE
CLASS="PROGRAMLISTING"
>CREATE VIEW myview AS SELECT * FROM mytab;</PRE
><P>

    compared against the two commands:

</P><PRE
CLASS="PROGRAMLISTING"
>CREATE TABLE myview (<TT
CLASS="REPLACEABLE"
><I
>same column list as mytab</I
></TT
>);
CREATE RULE "_RETURN