We give a characterizations of Ramsey ultrafilters on P(ω) in terms of functions f : ω n → ω and their ultrafilter extensions. To do this, we prove that for any partition P of [ω] n there is a finite partition Q of [ω] 2n such that any set X ⊆ ω that is homogeneous for Q is a finite union of sets that are canonical for P.