Ian Barwick <barwick@gmx.net> writes:
> To avoid voodoo with PostgreSQL version numbers
> a check is made whether pg_relcheck exists and
> the appropriate query (either 7.3 or pre 7.3)
> executed.
I would think that looking at version number (select version())
would be a much cleaner approach. Or do you think that direct
examination of pg_class is a version-independent operation?
This inquiry into pg_relcheck's existence is already arguably wrong
in 7.3 (since it's not taking account of which schema pg_relcheck
might be found in) and it can only go downhill in future versions.
regards, tom lane