Postgresql with Npgsql "relation <tablename> does not exist." Only occurring on Win 7
The strange and erratic behaviour seen here, and discussion in the comments, suggests that the system catalogs (in the pg_catalog
schema) may've been modified directly - perhaps an attempt to REVOKE
some permissions.
That's not a good idea. The system catalogs should really only be modified by experts. That's one of the reasons only superuser accounts can modify them directly, and one of the many reasons you should not use superuser accounts in day-to-day operation.
Unless you know exactly what was done and can undo it, I'd recommend reverting to a working copy of the database like the one on your known-good XP machine. GRANT
ing access to public
in pg_catalog
sounds like it helped, but who knows what else has been done.
If this were my DB I'd take a pg_dump
of each database and a pg_dumpall --globals-only
and restore it to a spare DB to make sure it looked complete. I'd then stop Pg and re-initdb. That's a bit of a pain on Windows, though, so you might well be fine with just backing up the damaged database, DROP
ping it, re-creating it and restoring the data back into it.