Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "Marko" == Marko Tiikkaja <marko(at)joh(dot)to> writes:
> Marko> create table qwr();
> Marko> create rule "_RETURN" as on select to qwr do instead select;
> I've wondered for a while whether this wouldn't have been better handled
> as:
> create view qwr(colnames...) as select null::type1, null::type2, ...;
> /* ... */
> create or replace view qwr as ...;
Yeah, possibly. The existing pg_dump coding dates from before we had
CREATE OR REPLACE VIEW.
But we'll have to live with pg_dump files that do this for the indefinite
future, so I agree some fix is needed on the backend side.
regards, tom lane