So while poking around contrib/spi and trying to put together an SGML doc file for it, I realized that the preprocessor/ subdirectory seems entirely useless. What it does is generate CREATE TRIGGER commands for use with contrib/spi/refint.c, given SQL input that includes FOREIGN KEY clauses. That was probably useful before we had foreign key functionality, but I cannot imagine a use for it today --- in practice you'd use the real FK support.
Of course, you could argue that refint.c itself has zero use anymore, but as an example of custom trigger writing it may still have some value, so I'm not proposing removing it. I don't, however, see the point of keeping this preprocessor around. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match