Oleg Bartunov <oleg@sai.msu.su>
> After dumping (by pg_dump) and restoring views becomes a tables
> 

The problem is that views are dumped with anm extraneous "WHERE"

> ............................
> QUERY: COPY "t1" FROM stdin;
> CREATE RULE "_RETv1" AS ON SELECT TO "v1" WHERE  DO INSTEAD SELECT "a" FROM 
"t1";
> QUERY: CREATE RULE "_RETv1" AS ON SELECT TO "v1" WHERE  DO INSTEAD SELECT "a" 
FROM "t1";

...................................................++++++

> ERROR:  parser: parse error at or near "do"
> EOF

Which causes this error and the rule (View) is not Created.

I don't know how the where clause gets in there but if you
edit the dump before restoring all is OK.

Keith.


Fri, 21 May 1999 22:34:50 +0100 (BST)
Keith Parks <emkxp01@mtcc.demon.co.uk>
Re: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)