This paper concerns Gradel's question asked in 1992: whether all problems which are in PTIME and closed under substructures are definable in second-order HORN logic SO-HORN. We introduce revisions of SO-HORN and DATALOG by adding first-order universal quantifiers over the second-order atoms in the bodies of HORN clauses and DATALOG rules. We show that both logics are as expressive as FO(LFP), the least fixed point logic. We also prove that FO(LFP) can not define all of the problems that are in PTIME and closed under substructures. As a corollary, we answer Gradel's question negatively.