Re: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd) - Mailing list pgsql-hackers

From Keith Parks
Subject Re: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)
Date
Msg-id 199905212134.WAA05798@mtcc.demon.co.uk
Whole thread Raw
In response to [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] strange behavior of UPDATE
Next
From: Bruce Momjian
Date:
Subject: ddd and postgres prompt