A generalized Kadomtsev-Petviashvili equation, describing water waves in oceans of varying depth, density and vorticity is discussed. A priori, it involves 9 arbitrary functions of one, or two variables. The conditions are determined under which the equation allows an infinite-dimensional symmetry algebra. This algebra can involve up to three arbitrary functions of time. It depends on precisely three such functions if and only if it is completely integrable. (C) 2002 Elsevier Science (USA). All rights reserved.