Overall +1 to the idea of a warning. Regarding warning vs error, I agree that a WARNING is probably the right > choice generally. But I think that Divya is correct: When > log_statement = 'all', an error should be thrown instead.
First, it should be for 'all' AND 'ddl'. And obviously glossing over log_min_duration_statement entirely. But -1 to throwing an ERROR - that's not really an error, and not our call to make, so a WARNING is sufficient. Cheers, Greg