reference: https://www.postgresql.org/message-id/[email protected]
Since the view definition is installed by initdb, merely upgrading will
not fix the problem. If you need to fix this in an existing installation,
you can (as a superuser) drop the information_schema schema then re-create
it by sourcing SHAREDIR/information_schema.sql. (Run pg_config --sharedir
if you're uncertain where SHAREDIR is.) This must be repeated in each
database to be fixed.
- find SHAREDIR by running
pg_config --sharedir - run script SHAREDIR/information_schema.sql to re-create schema information_schema