Jon Lapham writes:
> I'm receiving the following error message:
> ERROR: Relation "log" with OID 3694127 no longer exists
As a general rule, this won't work in PostgreSQL:
CREATE TABLE foo (...);
CREATE RULE bar ... ON foo ...; # view, trigger, etc.
DROP TABLE foo (...);
CREATE TABLE foo (...);
The rule (view, trigger) references the table by oid, not by name. (This
is a good thing. Consider what happens when the newly created table has a
totally different structure.) The correct fix would be to prevent the
DROP TABLE or drop the rule with it, but it hasn't been done yet.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter