I wonder if pg_typeof() should be marked stable instead of immutable?Its results certainly depend on the contents of system catalogs ...
regards, tom lane