[check_postgres] same_schema check doesn't work with 9.0

Robert Treat xzilla at users.sourceforge.net
Sat Mar 6 21:04:34 UTC 2010


Hey guys,

we've been done some semi-regular testing of check_postgres against 8.5/9.0. 
Most everything has worked so far, but we found a breakage in "same_schema" 
check in alpha4. 

rtm:check_postgres robert$ ./check_postgres.pl --action=same_schema --
host=mdb1.int.c.net --host2=mdb1.dev.c.net -u reconnoiter --dbname=reconnoiter 
--port=5432 --port2=5490 
ERROR: ERROR:  column "tgisconstraint" does not exist
LINE 1: ...d)  JOIN pg_proc p ON (p.oid = tgfoid)  WHERE NOT tgisconstr...

The problem stems from this change: 
http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=2f54037dc8e957cb843587b27c7cd4f586a41fd7

quite simply, the column definitions of pg_trigger have been changed. the code 
is around line 4692:

4688                 if (! exists $filter{notriggers}) {
4689                         $SQL = q{SELECT tgname, quote_ident(relname), 
proname, proargtypes FROM pg_trigger }
4690                                 . q{ JOIN pg_class c ON (c.oid = tgrelid) 
}
4691                                 . q{ JOIN pg_proc p ON (p.oid = tgfoid) }
4692                                 . q{ WHERE NOT tgisconstraint}; ## 
constraints checked separately
4693                         $info = run_command($SQL, { dbuser => 
$opt{dbuser}[$x-1], dbnumber => $x } );

would seem like a quick if based on version for that where clause should fix 
it, but figured i'd just poke the list rather than a patch in case you want it 
done differently. 

-- 
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com


More information about the Check_postgres mailing list