I think Jade has a good point.
Possibly using awk, m4, or even TCL as a macro language, perhaps code for both Oracle and Postgres could be developed at the same time from the same set of higher-level macro definitions. Adding support for a third database (DB2? SapDB a/k/a MySql MAX-5?) would then be a case of porting the table definitions and the macro language.
This would reduce simple errors like mis-spellings and possibly lead to a series of tests that could be auto-generated as well.